AWS Lightsail 의 PHP 8 버전에서 SSH2 서비스 사용하기
https://www.php.net/manual/en/book.ssh2.php
현재 php7에서 사용 가능한 yum install php-pecl-ssh2 는 아직은 지원을 안하는 것으로 보입니다.
그래서 아래의 방법으로 설치하여 ssh2 환경에서 sftp 를 사용하고자 합니다.
$> sudo su
# 아래 1컬럼에 있는 것은 모두 su 의 쉘 명령입니다.
cd
amazon-linux-extras install -y php8.0
yum install -y gcc php-devel libssh2-devel
wget https://pecl.php.net/get/ssh2-1.3.1.tgz
tar xvfz ssh2-1.3.1.tgz
cd ssh2-1.3.1
phpize
./configure ; make ; make install
echo "extension=ssh2.so" > /etc/php.d/ssh2.ini
systemctl restart php-fpm
php -r "ssh2_tunnel();"
vi /etc/ssh/sshd_config
PasswordAuthentication no 를 yes 로 수정
systemctl restart sshd
passwd ec2-user
암호를 만들고
sftp ec2-user@localhost
위 명령으로 접속해서 sftp> 라고 나오면 성공
댓글 3개
3년 전
감사합니다
3년 전
감사합니다
코드오타쿠
3년 전
감사합니다~
게시판 목록
개발자팁
개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.
질문은 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 4946 | node.js | 6년 전 | 2610 | ||
| 4945 | node.js | 6년 전 | 2382 | ||
| 4944 | node.js | 6년 전 | 2520 | ||
| 4943 | node.js | 6년 전 | 2272 | ||
| 4942 | node.js | 6년 전 | 2250 | ||
| 4941 | node.js | 6년 전 | 2720 | ||
| 4940 | node.js | 6년 전 | 1867 | ||
| 4939 | node.js | 6년 전 | 1995 | ||
| 4938 | node.js | 6년 전 | 2459 | ||
| 4937 | node.js | 6년 전 | 2250 | ||
| 4936 | node.js | 6년 전 | 2322 | ||
| 4935 | node.js | 6년 전 | 2136 | ||
| 4934 | node.js | 6년 전 | 2442 | ||
| 4933 | node.js | 6년 전 | 2247 | ||
| 4932 | node.js | 6년 전 | 2687 | ||
| 4931 | node.js | 6년 전 | 2070 | ||
| 4930 | node.js | 6년 전 | 1999 | ||
| 4929 | node.js | 6년 전 | 8632 | ||
| 4928 | node.js | 6년 전 | 3750 | ||
| 4927 | node.js | 6년 전 | 2394 | ||
| 4926 | node.js | 6년 전 | 2504 | ||
| 4925 | node.js | 6년 전 | 2084 | ||
| 4924 | node.js | 6년 전 | 3374 | ||
| 4923 | node.js | 6년 전 | 2221 | ||
| 4922 | node.js | 6년 전 | 1991 | ||
| 4921 | node.js | 6년 전 | 2046 | ||
| 4920 | node.js | 6년 전 | 1765 | ||
| 4919 | node.js | 6년 전 | 2032 | ||
| 4918 | node.js | 6년 전 | 2180 | ||
| 4917 | node.js | 6년 전 | 2396 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기