由于默认的ubuntu默认安装了openssh-client,直接安装可能导致与openssh-server不匹配所以全部卸载,重新安装,这样不会有任何问
1、卸载已经存在的ssh-clientapt-getpurgeopenssh-serverapt-getpurgeopenssh-client或者Aptremoveopenssh-clientAptremoveopenssh-server2、安装sshapt-getinstallopenssh-serverapt-getinstallopenssh-client或者Aptinstallopenssh-clilentAptinstalllopenssh-server3、解决算法协商失败错误DisconnectionServerrespoinded"lllgorith*negotiationKeyexchangewiththsremaiteLostfailed!.Thiecankappenforesamplei£theremotehost口顿put龟fdpei的trtippcirtihtthmsserverresponded“Algorithmnegotiationfailes”报错问题解决办法,ubuntu16.04sudovi/etc/ssh/sshd_config添加如下内容Ciphersaes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbcMACshmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96KexAlgorithmsdiffie-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,HYPERLINK"mailto:curve25519-sha256@libssh.org"curve25519-sha256@libssh.org4、开启root账户登录修改文件/etc/ssh/sshd_configVi/etc/ssh/sshd_config在Authentication部分,注释掉"PermitRootLoginwithout-password,在Authentication部分,添加“PermitRootLoginyes”5、重启sshsudoservicesshrestart登录成功10.1,1199-defauH-SSHSecureShell—IIXffegdit^iew虫iidowHelpZlQuickConnect_|ProfilesThiacopyof5SHSecureShellisanon-coinneratalversion,rnuwraiDndoesnotincludePKI占ndPKCStilfunctionallEy.WelcometoUbuntu1404,3LTS(GW/Linus4,13.0-2€-generic|ADccuijsntatiQn:https://heIf.ufcuntu.coir.1:htrpd:/landscape.canorLical.ccit*SuppojiE:https://ubuntu.com/advantage缰岳用获h?4iflt134涓Theprc^ranisincludedwithEbeUbuntusystemarefree3&frwar&;the«x&CT:diacributlontermsfortachprtigrajtaredescribedLnrheindividualfiledin/usr/ffhare/doc/J/copyright.UbuntucomeswithABSOHTTELYNOWARRANTStotheextentpcririttedbyapplicablelaw.root@zheng-vi.rtiia1-machine:|Connectedto10,1,3,199SSH2^aes128-cbc-hmac-mdS80x24g]