我正在嘗試 ssh 到與我的 Ubuntu 不同的系統,但在這個日誌之後它被卡住了
root@akash:~# ssh -vvv [email protected]
OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "192.168.2.219" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 192.168.2.219 [192.168.2.219] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
一段時間後,我連接超時。我透過ssh-keygen -t rsa
在兩台機器上產生了新的 ssh RSA 金鑰,然後將我的公鑰複製id_rsa.pub
到遠端機器的檔案中authorized_keys
,反之亦然。
現在,一台機器可以輕鬆登錄,但另一台機器無法登入。
誰能告訴我如何解決這個問題?