Mac下使用.ppk密钥转换pem进行ssh私钥远程登录

使用Windows下的putty客户端可以直接使用.ppk密钥文件进行认证登录远程服务器。

Mac系统虽然自带了Terminal,但是Mac下的Terminal使用.pem文件,而不是.ppk文件,而.pem文件可以从.ppk文件转换而来。

一种方法是使用Windows下的puttygen进行转换,笔者未尝试过。

另一种方法是在Mac系统下安装putty并进行转换,步骤如下:

1. 使用Homebrew安装putty(homebrew是Mac下的包管理工具):

$brew install putty

同时会安装puttygen。

2. 使用puttygen从.ppk文件产生.pem文件:

$puttygen privatekey.ppk -O private-openssh -o privatekey.pem

注意:前面一个是大写O,后面一个小写o。

3. 使用.pem远程登录

¥ssh -i privatekey.pem user@my.server.com

 

http://blog.sciencenet.cn/blog-935970-887472.html

分享到:

258 条评论

昵称
  1. potenzmittel kaufen

    Utterly written written content, thanks for selective information.

  2. Admiring the hard work you put into your site and in depth information you offer. It’s great to come across a blog every once in a while that isn’t the same old rehashed material. Wonderful read! I’ve saved your site and I’m adding your RSS feeds to my Google account.

  3. steroide kaufen

    I like what you guys are up also. Such clever work and reporting! Carry on the excellent works guys I?¦ve incorporated you guys to my blogroll. I think it will improve the value of my site 🙂

  4. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You definitely know what youre talking about, why waste your intelligence on just posting videos to your weblog when you could be giving us something enlightening to read?

  5. steroide kaufen

    I have not checked in here for a while as I thought it was getting boring, but the last several posts are great quality so I guess I will add you back to my everyday bloglist. You deserve it my friend 🙂

  6. Cool blog! Is your theme custom made or did you download it from somewhere? A theme like yours with a few simple adjustements would really make my blog shine. Please let me know where you got your theme. Thanks

  7. Greetings! This is my first comment here so I just wanted to give a quick shout out and say I really enjoy reading through your articles. Can you recommend any other blogs/websites/forums that deal with the same subjects? Thanks!

  8. Hi, I think your site might be having browser compatibility issues. When I look at your website in Safari, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, fantastic blog!

  9. explanation

    I appreciate your piece of work, appreciate it for all the good posts.

  10. website link

    Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You definitely know what youre talking about, why throw away your intelligence on just posting videos to your blog when you could be giving us something informative to read?

  11. read review

    Keep functioning ,splendid job!

  12. read

    I am no longer positive the place you’re getting your information, but great topic. I must spend a while learning much more or working out more. Thank you for fantastic info I used to be on the lookout for this information for my mission.

  13. dig this

    Hi, I think your site might be having browser compatibility issues. When I look at your website in Safari, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, fantastic blog!

  14. this website

    Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You clearly know what youre talking about, why waste your intelligence on just posting videos to your blog when you could be giving us something enlightening to read?

  15. address

    Wohh just what I was searching for, thankyou for posting.

  16. read more

    You are my breathing in, I have few web logs and very sporadically run out from to post .

  17. view website

    Its fantastic as your other content : D, regards for putting up.

  18. in this

    I like the efforts you have put in this, thanks for all the great articles.