您的位置:首页 > 其它

ubuntu 16.4开启ssh服务

2017-05-01 15:15 344 查看
1、安装 OpenSSH Server(sudo apt-get install openssh-server) ;

2、使用SSH Secure Shell Client连接ubuntu,提示 server responded "algorithm negotiation failed",则需要修改/etc/ssh/sshd_config文件,在文件的最后添加如下内容:

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.org

且需要将/etc/ssh/sshd_config文件中

PermitRootLogin prohibit-password修改为PermitRootLogin
yes (如果该文件无法修改,参考一下步骤,a、sudo passwd root;b、设置root用户的密码;c、su - root 切换至root用户,再使用vi /etc/ssh/sshd_config)

4、修改配置并保存后,重新启动SSH服务 

sudo service ssh restart

5、使用SSH Secure Shell Client可连接至ubuntu主机
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ubuntu16.4 ssh root