本文章转载自:谷歌云使用SSH客户端进行连接 作者:托尼

谷歌云默认是使用浏览器的SSH客户端进行连接

安全性来说这样是最高等级的,但是有时候我们为了方便也需要外部SSH客户端进行管理

具体步骤如下:

  1. 先使用谷歌云VM实例控制台的浏览器方式登陆进去SSH
  2. 切换到root角色
sudo -i

 
3. 修改SSH配置文件

vim /etc/ssh/sshd_config
  1. 找到需要修改的两个条目
在这附近:  
# Authentication:  
#LoginGraceTime 2m  
PermitRootLogin no

修改PermitRootLoginyes

以及:

在这附近:  
# To disable tunneled clear text passwords, change to no here!  
#PasswordAuthentication yes  
#PermitEmptyPasswords no  
PasswordAuthentication no

修改PasswordAuthenticationyes

  1. 给root用户设置密码
passwd
  1. 重启SSH服务使修改生效
service sshd restart

注:默认端口为22,重启SSH服务之后即可使用Xshell或者FinalShell等软件登陆

Last modification:January 18, 2021
If you think my article is useful to you, please feel free to appreciate