一、首先安裝 ssh server windows
sudo apt-get install openssh-server瀏覽器
二、安裝完畢後,修改配置文件 /etc/ssh/sshd_configssh
gedit /etc/ssh/sshd_config
找到PermitRootLogin prohibit-password,加上#註釋
在後邊加上一句:PermitRootLogin yes,而後保存
重啓服務: service sshd restart
三、以上操做後,ssh客戶端仍然報錯:algorithm negotiation failed
則繼續修改 /etc/ssh/sshd_config 文件,在文件最後加入如下內容:ide
Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc3d
MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96rest
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.orgserver
注:以上操做可在Ubuntu 桌面下打開 瀏覽器查找後複製,不然內容很差從windows複製到 Ubuntu。ip