[已解决][阅读下面的答案]以某种方式 ping IP 地址导致Request timeout
,这意味着客户端和服务器端点之间的连接存在问题。感谢user68186帮助我跟踪问题,非常感谢!
我刚刚将 Ubuntu 服务器从 14.04 升级到 16.04。
ssh
服务已在服务器中启动。
升级后我无法通过 SSH 连接到服务器。
我正在使用自定义端口,说它是1234
sshd_config logLevel
已设置为DEBUG3
,最高级别。
我试图检查auth.log
文件,但它没有捕捉到任何东西。
已经设置在iptables
:
iptables -I INPUT -p tcp --dport 1234 -j ACCEPT
ssh -vvv
从显示此消息的客户端执行:
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/username/.ssh/config
debug1: /Users/username/.ssh/config line 74: Applying options for target_server
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: /etc/ssh/ssh_config line 52: Applying options for *
debug2: resolve_canonicalize: hostname 192.1.2.3 is address
debug2: ssh_connect_direct
debug1: Connecting to 192.1.2.3 [192.1.2.3] port 1234.
debug1: connect to address 192.1.2.3 port 1234: Operation timed out
ssh: connect to host 192.1.2.3 port 1234: Operation timed out
从客户端执行ssh localhost
产生:
Password:
Last login: Wed Feb 5 00:34:54 2020 from 127.0.0.1
Agent pid 22321
Identity added: /Users/username/.ssh/id_rsa (/Users/username/.ssh/id_rsa)
任何线索?