GCP 免密钥登陆

1.1.切换到root角色
sudo -i

1.2.给root用户设置密码
passwd root

1.3.修改SSH配置文件/etc/ssh/sshd_config
vi /etc/ssh/sshd_config


修改PermitRootLogin和PasswordAuthentication为yes

# Authentication:
PermitRootLogin yes //默认为no,需要开启root用户访问改为yes

# Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes //默认为no,改为yes开启密码登陆

1.4.重启SSH服务使修改生效
systemctl restart sshd.service

1.5.登录
在putty中,直接使用root账号密码登录。

 

登录系统反应慢:
UseDNS no
GSSAPIAuthentication no

 

 

https://blog.csdn.net/datadev_sh/article/details/79593360

posted on 2019-04-12 17:54  shabake  阅读(312)  评论(0编辑  收藏  举报

导航