用ssh key秘钥登录GCP

  1. 首先准备公钥,私钥,用mobaxterm或者bitivise ssh或者putty生成一对秘钥,SSH工具推荐度从前到后
  1. 打开公钥.pub文件,复制其中的ssh-rsa AAA(省略)Generated by XXX,不要Generated by后面的用户名

  2. 进入GCP–>Compute Engine–>metadata(元数据)–>SSH秘钥,然后添加

  3. 比着下面的模板修改,填入之前复制的公钥GCP账号,记得修改过期时间,保存

ssh-rsa AAAAB(省略一部分)OT1CVlRJ google-ssh {“userName”:”你的GCP账号@gmail.com”,”expireOn”:”2019-11-26T07:26:54+0000”}

Comments

You need to set client_id and slot_id to show this AD unit. Please set it in _config.yml.