当前位置:文档之家› Ubuntu 16.04远程登录服务器ssh的安装和配置

Ubuntu 16.04远程登录服务器ssh的安装和配置

或者
Apt remove openssh-client
Apt remove openssh-server
2、安装ssh
apt-getinstall openssh-server
apt-getinstall openssh-client
或者
Apt install openssh-clilent
Apt installl openssh-server
5、重启ssh
sudo service ssh restart
登录成功
由于默认的ubuntu默认安装了openssh-client,直接安装可能导致与openssh-server不匹配
所以全部卸载,重新安装,这不会有任何问题
1、卸载已经存在的ssh-client
apt-get purge openssh-server
apt-get purge openssh-client
3、解决算法协商失败错误
server responded “Algorithm negotiation failes” 报错问题解决办法,ubuntu16.04
sudo 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@,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@
4、开启root账户登录
修改文件/etc/ssh/sshd_config
Vi/etc/ssh/sshd_config
在Authentication部分,注释掉“PermitRootLogin without-password”
在Authentication部分,添加“PermitRootLogin yes”
相关主题