用公私钥远程连接谷歌云 / 网络研习社#24

in cn •  5 years ago  (edited)

google.jpg

有了免费的谷歌云,怎么连上它呢?在谷歌云创建实例(虚拟机)的时候好像并没有设置root密码,习惯使用的密码登录的方式好像不大好用哦。当然,谷歌云可以在后台使用窗口的形式使用SSH,但我们还是喜欢在本地去连接它,这样也方便很多不是嘛。

查了一圈,谷歌云的远程要使用公私钥的形式去连接(突然想到了比特币呢)。公钥存在谷歌云上,本机携带私钥去连接它,有点类似带钥匙开门的意思。这种方法倒也不难,而且一次生成,以后都不用记密码了,还有就是可以用它登录所有的实例!

puttykey2.jpg

1、先在本机上用 puttygen 生成一对公私钥,保存好私钥文件。

google2.jpg

2、到谷歌的后台中 -> coupute engine -> 元数据 -> 密钥 , 在修改中增添一条新的记录。将上一步中生成的公钥贴入就可以了。服务器这块就设置好了。

putty.jpg

3、在putty上如上图填入主机名。

putty2.jpg

4、携带私钥去连接云主机!

好了,可以好好玩了!


网络研习社系列文章:


@lemooljiang #network-institute

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

不错的文章,学习了!

Congratulations @lemooljiang! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 3 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!