本文章转载自:谷歌云使用SSH客户端进行连接 作者:托尼
谷歌云默认是使用浏览器的SSH客户端进行连接
安全性来说这样是最高等级的,但是有时候我们为了方便也需要外部SSH客户端进行管理
具体步骤如下:
- 先使用谷歌云VM实例控制台的浏览器方式登陆进去SSH
- 切换到root角色
sudo -i
3. 修改SSH配置文件
vim /etc/ssh/sshd_config
- 找到需要修改的两个条目
在这附近:
# Authentication:
#LoginGraceTime 2m
PermitRootLogin no
修改PermitRootLogin
为yes
以及:
在这附近:
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication no
修改PasswordAuthentication
为yes
- 给root用户设置密码
passwd
- 重启SSH服务使修改生效
service sshd restart
注:默认端口为22,重启SSH服务之后即可使用Xshell或者FinalShell等软件登陆