Ubuntu 16.04 server开放root ssh登录权限

1.刚安装了Ubuntu 16.04 server的虚拟机,普通帐号可以远程登录,但是root不行,输入密码后一直报错:
permission denied

最后发现ssh的配置(/etc/ssh/sshd_config)不大一样,16.04的默认配置是:
[plain] view plain copy print?
PermitRootLogin without-password

要改成
[plain] view plain copy print?
PermitRootLogin yes

重启服务即可

2.可以利用root账户在xshell连接虚拟机,但是不能通过SSH Secure File Transfer Client传输文件,再次配置
/etc/ssh/sshd_config文件,添加
MaxAuthTries 3
PasswordAuthentication YES
Ciphers aes128-cbc,aes256-cbc
KexAlgorithms diffie-hellman-group1-sha1

再次重启服务即可

你可能感兴趣的:(Linux)