ubuntu 15.10 ssh 원 격 로그 인 허용 (22 포트 개통)
1349 단어 Linux 기반
[c:\~]$ ssh 192.168.142.84 Connecting to 192.168.142.84:22... Could not connect to '192.168.142.84' (port 22): Connection failed. Type `help' to learn how to use Xshell prompt.
이 IP 주소 의 22 포트 연결 이 실 패 했 습 니 다.
해결 방법 은 다음 과 같다.
(1) 방화벽 을 닫 고 sudo ufw disable 을 실행 합 니 다.
nii@nii:~$ sudo ufw disable
[sudo] password for nii:
Firewall stopped and disabled on system startup
(2) OpenSSH 를 설치 하고 sudo apt - get install openssh - server openssh - client 명령 을 실행 합 니 다.
(3) netstat - tnl 명령 을 실행 하여 22 포트 가 개통 되 었 는 지 확인 합 니 다.
nii@nii:~$ netstat -tnl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 ::1:631 :::* LISTEN
마지막 두 번 째 줄 에서 22 포트 가 LISTEN 상태 에 있 음 을 볼 수 있 습 니 다.