gcloud使用ssh连接配置
文章目录
gcloud使用ssh连接配置
1.进入实例面板 https://console.cloud.google.com/compute/instances
2.切换到root账户
sudo -i
- 修改SSH配置文件/etc/ssh/sshd_config
vi /etc/ssh/sshd_config
|
|
- 给root账户设置密码
passwd root
- 重启SSH服务使修改生效
|
|
- 添加本地的ssh公钥到gcloud元数据ssh中
方法二
- 切换到用户
su wx11055
- 生成ssh
ssh-keygen -f wx11055
- 拷贝wx11055.pub到本地
- 使用ssh工具导入pub连接
- 在.ssh文件夹下执行
|
|
通用免密登录方法
|
|
文章作者 gorpher
上次更新 2016-10-12