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에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 4946 | node.js | 6년 전 | 2614 | ||
| 4945 | node.js | 6년 전 | 2387 | ||
| 4944 | node.js | 6년 전 | 2524 | ||
| 4943 | node.js | 6년 전 | 2276 | ||
| 4942 | node.js | 6년 전 | 2256 | ||
| 4941 | node.js | 6년 전 | 2723 | ||
| 4940 | node.js | 6년 전 | 1869 | ||
| 4939 | node.js | 6년 전 | 1996 | ||
| 4938 | node.js | 6년 전 | 2460 | ||
| 4937 | node.js | 6년 전 | 2253 | ||
| 4936 | node.js | 6년 전 | 2326 | ||
| 4935 | node.js | 6년 전 | 2139 | ||
| 4934 | node.js | 6년 전 | 2447 | ||
| 4933 | node.js | 6년 전 | 2250 | ||
| 4932 | node.js | 6년 전 | 2690 | ||
| 4931 | node.js | 6년 전 | 2075 | ||
| 4930 | node.js | 6년 전 | 2001 | ||
| 4929 | node.js | 6년 전 | 8637 | ||
| 4928 | node.js | 6년 전 | 3755 | ||
| 4927 | node.js | 6년 전 | 2398 | ||
| 4926 | node.js | 6년 전 | 2507 | ||
| 4925 | node.js | 6년 전 | 2091 | ||
| 4924 | node.js | 6년 전 | 3376 | ||
| 4923 | node.js | 6년 전 | 2225 | ||
| 4922 | node.js | 6년 전 | 1995 | ||
| 4921 | node.js | 6년 전 | 2049 | ||
| 4920 | node.js | 6년 전 | 1769 | ||
| 4919 | node.js | 6년 전 | 2035 | ||
| 4918 | node.js | 6년 전 | 2183 | ||
| 4917 | node.js | 6년 전 | 2398 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기