联系我们
新闻公告使用手机扫一扫查看
< 返回

谷歌云开虚拟机,Google Cloud gcp使用教程

2022-07-16 12:32 作者:云群网络 阅读量:4996

       为什么谷歌云的SSH连接不上去?那是因为谷歌云你若是想使用第三方的SSH工具登录的话,需要进行下面的设置。说实话小编很不习惯这几大家,控制台看起来高大上,其实学习成本很高,有时候作为老司机都会被难到了。

google-cloud

谷歌云推荐以下工具连接:FinalShell SSH工具

设置root密码.

1、先选择从浏览器打开ssh连接服务器.

谷歌云开虚拟机

2、切换到root账号,输入代码:sudo -i

3、设置root密码,输入代码:passwd然后会要求输入新密码,然后再重复一次密码,输入密码的时候不会显示出来,所以直接输入密码,然后回车,再然后重复输入密码回车. 

开启SSH权限 开启SSH权限方法一

1、修改 SSH 配置文件/etc/ssh/sshd_config. vi /etc/ssh/sshd_config. 

2、然后再输”i”进入编辑模式

3、找到以下内容并修改 PermitRootLogin yes //默认为 no,需要开启 root 用户访问改为 yes PasswordAuthentication yes //默认为 no,改为 yes 开启密码登陆

4、修改完成后,再下按 esc 键,然后再输入::wq 5、重启服务器,输入命令:reboot 下面是第二种方法:(更加便捷,方便的登录 SSH).

开启SSH权限方法二 1、CentOS和Debian通用,输入以下两条命令:

sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/ssh/sshd_config

sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config

2、Ubuntu系统,输入以下两条命令

sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config

sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config

3、重启服务器,输入命令:reboot以上就是谷歌云设置ROOT用户以及允许第三方SSH登录教程。

联系我们
返回顶部