我尝试使用标准 ssh user@host 命令登录到我的服务器,虽然从技术上讲可以连接,但我无法获取 shell。我已经使用这个服务器几个月了,但我不明白发生了什么。我通过 Wireguard 连接到服务器(我没有物理或 KVM 访问权限),我可以 ping 内部 IP,但是,内部站点(在 nginx 后面运行)没有显示,SSH 也不起作用。
❯ ssh [email protected] -vvv
OpenSSH_8.5p1, OpenSSL 1.1.1j 16 Feb 2021
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolve_canonicalize: hostname 10.0.0.1 is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/user/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/user/.ssh/known_hosts2'
debug3: ssh_connect_direct: entering
debug1: Connecting to 10.0.0.1 [10.0.0.1] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: Connection established.
debug1: identity file /home/user/.ssh/id_rsa type 0
debug1: identity file /home/user/.ssh/id_rsa-cert type -1
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: identity file /home/user/.ssh/id_dsa-cert type -1
debug1: identity file /home/user/.ssh/id_ecdsa type -1
debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/user/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/user/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/user/.ssh/id_ed25519 type -1
debug1: identity file /home/user/.ssh/id_ed25519-cert type -1
debug1: identity file /home/user/.ssh/id_ed25519_sk type -1
debug1: identity file /home/user/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/user/.ssh/id_xmss type -1
debug1: identity file /home/user/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.5
谢谢您的帮助。服务器操作系统是 Ubuntu 20.04。
更新:
我尝试查看通过 telnet 连接到 SSH 会发生什么情况,然后收到以下消息:
Trying 10.0.0.1...
Connected to 10.0.0.1.
Escape character is '^]'.
Exceeded MaxStartups
Connection closed by foreign host.
知道 MaxStartups 是什么吗?