Google Cloud 配置使用SSH工具连接远程

发布者:梦幻一新科技 发布时间:2018-09-03 23:27:48 阅读次数:7696

Google Cloud 原本自带的SSH工具用着也挺不错,但是为了集中管理,还是用工具方便点。

首先使用Google Cloud SSH连接上去:

1.切换到 root

sudo -i

2.编辑ssh配置文件

vi /etc/ssh/sshd_config

3.修改以下内容即可

  1. PermitRootLogin yes
  2. PasswordAuthentication yes

4.重启ssh

service sshd restart

5.查看当前用户

root@instance-1:~# whotest pts/0        2018-05-18 21:55 (173.194.93.96)
看到登录用户是test

6.修改密码

root@instance-1:~# passwd test

7.用ssh登录

喜欢
(0)
0%
一般
(0)
0%