我不小心将自己锁定在服务器之外。我更改了端口,添加了 ssh 密钥,PermitRootLogin是“否”,如果我没记错的话PasswordAuthentication,也是“否”。在另一台服务器上登录工作正常,所以问题不是由于我的本地 ssh 密钥造成的。
通过登录时,ssh -vv -p 2345 username@12.34.56.78我会返回以下信息。
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 102: Applying options for *
debug1: Connecting to 12.34.56.78 [12.34.56.78] port 1234.
debug1: Connection established.
debug1: identity file /Users/yoeriboven/.ssh/id_rsa type 1
debug1: identity file /Users/yoeriboven/.ssh/id_rsa-cert type -1
debug1: identity file /Users/yoeriboven/.ssh/id_dsa type -1
debug1: identity file /Users/yoeriboven/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility …Run Code Online (Sandbox Code Playgroud)