Ubuntu16.04鏈接SSH出現 Server responded 「Algorithm negotiation failed」 的解決方法

今天安裝了Ubuntu16.04虛擬機,與SSH鏈接時出現了以下問題vim

解決方法以下:ssh

(寫在前面:請先確保本身已經給Ubuntu安裝了SSH服務。安裝方法是在root模式下,終端輸入命令apt-getinstall vim ssh)ui

1. 在Ubuntu終端中輸入以下命令,進入配置文件spa

vim /etc/ssh/sshd_config.net

2. 找到如圖的文本命令行

將此處文本修改成下圖所示(註釋掉「PermitRootLogin prohibit-password」,另起一行添加「PermitRootLogin yes」)3d

3. 將光標移動到文檔末尾,在文檔末尾添加以下文本rest

 

Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96
KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.orgblog

如圖所示:ip

4. 使用命令「ESC + : + x」退出文本編輯。而後在命令行輸入命令 service ssh restart

5. 回到PC機,打開SSH軟件,點擊Quick Connect按鈕,輸入Ubuntu虛擬機的ip地址以及用戶名(用戶名必定要輸入root,不然可能會致使SSH中某些操做權限不夠)

6. 點擊鏈接,輸入密碼,點擊OK

7. 大功告成

 

本文摘自個人CSDN博客,原文連接https://blog.csdn.net/a154299/article/details/79904620

相關文章
相關標籤/搜索