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

分享到:

170 条评论

昵称
  1. I loved your article post.Really looking forward to read more. Great.

  2. I value the blog.Really thank you! Awesome.

  3. Very informative post.Much thanks again. Will read on…

  4. Thank you for your post. Great.

  5. whoah this blog is excellent i really like studying your posts.

    Stay up the great work! You realize, a lot of persons are searching around for this information, you could help them greatly.

  6. Woah! I’m really loving the template/theme
    of this website. It’s simple, yet effective. A lot of times it’s
    hard to get that “perfect balance” between superb usability
    and visual appearance. I must say that you’ve done a superb job with this.
    Also, the blog loads super quick for me on Opera.
    Exceptional Blog!

  7. liteblue login

    I think this is a real great post. Want more.

  8. If some one wants expert view regarding blogging and site-building afterward i suggest
    him/her to pay a quick visit this website, Keep up the good job.

  9. Saved as a favorite, I really like your site!

  10. I am regular visitor, how are you everybody? This article posted at this website is truly nice.

  11. Thanks in support of sharing such a nice idea, post is
    pleasant, thats why i have read it fully

  12. Good answers in return of this question with real arguments and describing everything regarding that.

  13. I am so grateful for your article.Really looking forward to read more. Will read on…

  14. I think this is a real great blog.Really thank you! Will read on…

  15. minecraft games

    I love it whenever people get together and share ideas. Great site, keep it up!

  16. minecraft games

    I have been browsing online more than 2 hours
    today, yet I never found any interesting article like yours.
    It is pretty worth enough for me. In my opinion, if all web owners
    and bloggers made good content as you did, the internet will be a lot more useful than ever before.

  17. steel cock ring

    I cannot thank you enough for the blog article.Really thank you! Awesome.

  18. minecraft games

    An interesting discussion is definitely worth comment. I think that you need to
    write more about this issue, it might not be a taboo subject but usually people do not discuss such subjects.

    To the next! Kind regards!!

  19. minecraft games

    hey there and thank you for your information – I’ve definitely picked
    up anything new from right here. I did however expertise several technical
    points using this website, since I experienced to reload the website lots of times previous to I could get it
    to load properly. I had been wondering if
    your web hosting is OK? Not that I’m complaining, but sluggish loading instances times will
    very frequently affect your placement in google and could damage your high quality score if ads and marketing
    with Adwords. Well I’m adding this RSS to my email and could look
    out for a lot more of your respective intriguing content.
    Ensure that you update this again soon.

  20. minecraft games

    Hi there just wanted to give you a quick heads up. The text in your article seem to be running off the
    screen in Opera. I’m not sure if this is a format issue or something to do
    with browser compatibility but I figured I’d post to let you know.

    The style and design look great though! Hope you get the
    issue resolved soon. Thanks