ssh端口开放,却无法连接
在使用nmap扫描目标主机时:
nmap –osscan-guess www.minzhuokj.com
Starting Nmap 7.91 ( https://nmap.org ) at 2020-11-26 19:44 ?D1ú±ê×?ê±??
Nmap scan report for www.minzhuokj.com (39.96.251.199)
Host is up (0.025s latency).PORT STATE SERVICE
1/tcp open tcpmux
3/tcp open compressnet
4/tcp open unknown
6/tcp open unknown
7/tcp open echo
9/tcp open discard
13/tcp open daytime
17/tcp open qotd
19/tcp open chargen
20/tcp open ftp-data
21/tcp open ftp
22/tcp open ssh
23/tcp open telnet
24/tcp open priv-mail
25/tcp open smtp
26/tcp open rsftp
发现 ssh 的 22 号端口开放, 于是尝试连接:
ssh.exe 39.96.251.199
ssh_exchange_identification: read: Connection reset
正常情况应该是提示输入用户名密码.
尝试获取更多详细信息:
ssh.exe 39.96.251.199 -v
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug1: Connecting to 39.96.251.199 [39.96.251.199] port 22.
debug1: Connection established.
debug1: identity file C:\Users\foyou/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\foyou/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\foyou/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\foyou/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\foyou/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\foyou/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\foyou/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\foyou/.ssh/id_ed25519-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\foyou/.ssh/id_xmss type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\Users\foyou/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.7
ssh_exchange_identification: read: Connection reset
百度以下, 你就知道, 解决方法总结如下:
在服务端修改 ssh 配置
1
sshd: ALL