1:通过网页版SSH在浏览器窗口中打开

2. 通过sudo -i
命令切换到root
用户
sudo -i //切换到root用户

3. 修改SSH配置文件/etc/ssh/sshd_config
vi /etc/ssh/sshd_config //编辑文件

4.输入E

5.再输入I就可以编辑了

6.找到PermitRootLogin和PasswordAuthentication
PermitRootLogin yes //默认为no,需要开启root用户访问改为yes
PasswordAuthentication yes //默认为no,改为yes开启密码登陆
7.按下ESC键退出编辑
8.输入:wq回车
9. 重启SSH
服务
Ubuntu
debian
适用
/etc/init.d/ssh restart
Centos 7
适用:
systemctl restart sshd.service
10.用命令who查看当前登入用户名

11.使用passwd 用户名设置密码
passwd 用户名
12.输入密码,注意密码是不显示*号的

然后就可以用XShell连接谷歌云