xshell、mobaxterm如何连接谷歌云(gcp)vm实例
基于debain9的操作,若是centos7请看文档第四版操作的说明
1、使用gcp自带的浏览器shell登录vm实例

2、首先切换用户为root用户
sudo -i
3、为root用户设置密码
passwd root输入两次root用户密码Enter new UNIX password: Retype new UNIX password:控制台会提示设置成功
4、修改配置文件
vim /etc/ssh/sshd_config 需要修改的配置项目如下,在32行和56行:PermitRootLogin yesPasswordAuthentication yes
若使用centos则执行vim /etc/ssh/sshd_config 修改PermitRootLogin yesPasswordAuthentication yes保存并退出vim执行重启服务器的操作reboot即可生效,并且无需再执行/etc/init.d/ssh restart这个命令
5、重启服务
/etc/init.d/ssh restart
6、打开shell软件客户端
填写ip地址

之后输入用户名和密码就可以了
赞 (0)