technology:vps:谷歌云_gcp_开启密码与root用户登陆

Google Compute Engine创建的VM实例(以下简称GCE)上出于安全性考虑,只允许通过ssh key登陆并禁用了root登陆1).

Some time i need to login through passed.

I can open it through this way:

# step 1:
sudo su   //切换到root用户
 
# step 2:
vi /etc/ssh/sshd_config //编辑文件
 
# step 3:
# Authentication:
PermitRootLogin yes //默认为no,需要开启root用户访问改为yes
# Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes //默认为no,改为yes开启密码登陆
 
# step 4:
service sshd restart

  • technology/vps/谷歌云_gcp_开启密码与root用户登陆.txt
  • 最后更改: 2019/08/22 01:01
  • (外部编辑)