-------------------------------------
设置root管理员账户密码:
sudo passwd root
输入普通用户密码后修改。
修改后退出,用root登录
安装远程服务:
$ sudo apt-get install openssh-server
$ sudo /etc/init.d/ssh restart
检查服务状态:
systemctl --failed
Server responded "Algorithm negotiation faild."无法远程,
vi /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
无法用root远程,可以对 openssh server进行配置
$ sudo vi /etc/ssh/sshd_config
找到PermitRootLogin 一行,改为PermitRootLogin yes
添加和静态ip有关的参数,注释动态DNS:
# The primary network interface
iface eth0 inet static
address 192.168.1.247
netmask 255.255.255.0
gateway 192.168.1.2
$sudo ifdown eth0
$sudo ifup eth0
测试链接:正常。
附下边查资料参考的页面:
安装 openssh-server后,使用ssh客户端连接时可能报此错误,情况如下图所示
server responded "algorithm negotiation failed”
解决方法
修改ssh的配置文件 /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
重启sshd服务后
就可正常连接了
传送个Python试一下
原文地址:http://techfull.blog.51cto.com/1333523/1855562