谷歌云VPS开启客户端以root用户登录SSH
进入实例管理网页端,进入网页版SSH。
1.切换到root:
sudo -i
2.修改SSH配置文件/etc/ssh/sshd_config
nano /etc/ssh/sshd_config
3.修改PermitRootLogin和PasswordAuthentication为yes
# Authentication:
PermitRootLogin yes //默认为no,需要开启root用户访问改为yes
# Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes //默认为no,改为yes开启密码登陆
4.设置root密码
passwd root
5.重启SSH
(1)debian系:
/etc/init.d/ssh restart
(2)centos系:
systemctl restart sshd.service