AWS Lightsail 의 PHP 7.x 버전에서 SSH2 서비스 사용하기
$> sudo su
# 아래 1컬럼에 있는 것은 모두 su 의 쉘 명령입니다.
amazon-linux-extras install -y php7.4
yum install -y php-pecl-ssh2
php -r "ssh2_tunnel();"
PHP Warning: ssh2_tunnel() expects exactly 3 parameters, 0 given in Command line code on line 1
위와 같이 표시되면 성공입니다.
echo "extension=ssh2.so" > /etc/php.d/ssh2.ini
systemctl restart php-fpm
vi /etc/ssh/sshd_config
PasswordAuthentication no 를 yes 로 수정
systemctl restart sshd
passwd ec2-user
암호를 만들고
sftp ec2-user@localhost
위 명령으로 접속해서 sftp> 라고 나오면 성공
댓글 1개
3년 전
감사합니다
게시판 목록
개발자팁
개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.
질문은 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 5276 | 2년 전 | 1331 | |||
| 5275 | 2년 전 | 1401 | |||
| 5274 | 기타 | 2년 전 | 815 | ||
| 5273 | JavaScript |
swallow
|
2년 전 | 1045 | |
| 5272 | node.js |
swallow
|
2년 전 | 745 | |
| 5271 | JavaScript |
swallow
|
2년 전 | 1495 | |
| 5270 | PHP |
swallow
|
2년 전 | 844 | |
| 5269 | node.js |
swallow
|
2년 전 | 680 | |
| 5268 | node.js |
swallow
|
2년 전 | 1210 | |
| 5267 | PHP |
swallow
|
2년 전 | 1591 | |
| 5266 | MySQL |
swallow
|
2년 전 | 1089 | |
| 5265 | PHP |
swallow
|
2년 전 | 2029 | |
| 5264 | JavaScript |
swallow
|
2년 전 | 859 | |
| 5263 | 기타 |
swallow
|
2년 전 | 2980 | |
| 5262 | 기타 |
swallow
|
2년 전 | 667 | |
| 5261 | node.js |
swallow
|
2년 전 | 1059 | |
| 5260 | JavaScript |
swallow
|
2년 전 | 1508 | |
| 5259 | node.js |
swallow
|
2년 전 | 730 | |
| 5258 | node.js |
swallow
|
2년 전 | 1743 | |
| 5257 | node.js |
swallow
|
2년 전 | 1292 | |
| 5256 | PHP |
swallow
|
2년 전 | 1938 | |
| 5255 | node.js |
swallow
|
2년 전 | 685 | |
| 5254 | PHP |
swallow
|
2년 전 | 3011 | |
| 5253 | node.js |
swallow
|
2년 전 | 676 | |
| 5252 | 정규표현식 |
swallow
|
2년 전 | 623 | |
| 5251 | node.js |
swallow
|
2년 전 | 876 | |
| 5250 | PHP |
swallow
|
2년 전 | 1111 | |
| 5249 | node.js |
swallow
|
2년 전 | 1061 | |
| 5248 | PHP |
swallow
|
2년 전 | 1409 | |
| 5247 | node.js |
swallow
|
2년 전 | 1014 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기