无法使用 ubuntu 终端进行 ssh

无法使用 ubuntu 终端进行 ssh

我正在尝试使用 ubuntu 终端通过 ssh 连接到我的一台机器。我使用 VPN 连接到机器的网络。当我使用 flag ssh 时-v,我得到以下输出,然后它无限期地卡在那里,这也发生在另一台服务器上。但是当我使用 putty 访问这些服务器/机器时,它工作正常。我openssh-client openssh-server在客户端上重新安装了,但仍然是同样的问题。无法直接访问服务器,因此无法从中删除 ssh 服务器。

salman@salman-Latitude-5580:~$ ssh -v [email protected]
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 10.1.17.118 [10.1.17.118] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/salman/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/salman/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/salman/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/salman/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/salman/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/salman/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/salman/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/salman/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 10.1.17.118:22 as 'administrator'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY

答案1

您的主机可能不支持host key algorithm: ecdsa-sha2-nistp256.

查看 putty 的调试输出以了解支持的算法,然后为 ssh 指定相同的算法:

ssh -o "HostKeyAlgorithms ssh-rsa" user@hostname

相关内容