ubuntu14.04默认sshd配置不允许root登录,scp命令执行有问题

时间:2022-06-01 19:22:41

2015-12-19 15:49:01

# Authentication:
LoginGraceTime 120
# PermitRootLogin without-password
StrictModes yes

修改/etc/ssh/sshd_config

/etc/init.d/ssh restart 或者 service ssh restart

配置证书免登陆,使用ssh-copy-id命令,如:

ssh-copy-id root@192.168.33.20 #将本机本用户公钥copy至目标主机的root用户的/root/.ssh/authorized_keys里