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

分享到:

52 条评论

昵称
  1. Hey there! I realize this is kind of off-topic but I had to ask.

    Does running a well-established website such as yours take a massive amount work?
    I’m brand new to writing a blog however I do write in my diary every day.
    I’d like to start a blog so I will be able to share my own experience and thoughts
    online. Please let me know if you have any suggestions or tips for new aspiring bloggers.
    Thankyou!

  2. I know this website offers quality dependent articles and additional
    stuff, is there any other web page which gives these information in quality?

  3. Thanks a bunch for sharing this with all folks you actually
    recognize what you’re talking about! Bookmarked. Kindly also discuss
    with my website =). We can have a link alternate agreement among us

  4. Greetings from Idaho! I’m bored to death at work so I decided
    to check out your site on my iphone during lunch break.
    I enjoy the info you provide here and can’t wait to take a look when I get home.
    I’m surprised at how quick your blog loaded on my mobile ..
    I’m not even using WIFI, just 3G .. Anyhow, fantastic site!

  5. Someone essentially lend a hand to make seriously articles I’d
    state. This is the first time I frequented your website page and thus far?
    I amazed with the research you made to make this actual publish incredible.
    Magnificent task!

  6. Wonderful post! We are linking to this great article on our site.

    Keep up the good writing.

  7. Way cool! Some very valid points! I appreciate you writing this write-up and also the rest of the website is really good.

  8. Hello to every body, it’s my first visit of this webpage; this blog contains remarkable and really good data designed
    for visitors.

  9. What i do not understood is if truth be told how you are no longer
    really a lot more well-liked than you might be right now.
    You’re so intelligent. You already know thus significantly in terms
    of this subject, made me personally believe it from numerous various angles.
    Its like women and men are not interested
    except it is something to accomplish with Girl gaga!
    Your personal stuffs outstanding. Always care for it up!

  10. Hello, I enjoy reading through your article. I wanted to write a little comment
    to support you.

  11. Greetings I am so grateful I found your blog, I really found you by error, while I was searching on Bing for something else, Anyways I
    am here now and would just like to say thank you
    for a marvelous post and a all round entertaining blog (I also love the theme/design), I don’t have time to go through it all at the moment but I have saved
    it and also included your RSS feeds, so when I have time I will be back to read more,
    Please do keep up the awesome job.

  12. I needed to thank you for this fantastic read!!
    I absolutely enjoyed every little bit of it. I have got you bookmarked to check
    out new things you post…

  13. Yes! Finally something about plenty of fish dating site.

  14. tinyurl.com

    What’s up it’s me, I am also visiting this web site daily, this website is genuinely pleasant and the people are truly sharing nice thoughts.

  15. Howdy I am so delighted I found your blog page, I really found you by accident, while I was
    browsing on Google for something else, Nonetheless I am
    here now and would just like to say kudos for a remarkable post and a all round entertaining blog (I also love the theme/design), I don’t have time to read
    through it all at the minute but I have bookmarked it and also included your RSS
    feeds, so when I have time I will be back to read a lot more, Please do keep up the superb work.

  16. Oh my goodness! Impressive article dude! Thank you so much, However I am
    encountering problems with your RSS. I don’t understand why I am unable to subscribe to it.
    Is there anyone else having the same RSS problems?
    Anyone that knows the answer can you kindly respond?
    Thanks!!

  17. Its like you read my thoughts! You appear to
    know so much approximately this, such as you wrote the ebook in it or something.
    I believe that you just can do with some percent to force
    the message house a little bit, however other than that, that is fantastic blog.

    A great read. I will certainly be back.

  18. eebest8 best

    “Hmm it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I submitted and say, I’m thoroughly enjoying your blog. I too am an aspiring blog writer but I’m still new to everything. Do you have any tips for rookie blog writers? I’d certainly appreciate it.”

  19. Hello there! I could have sworn I’ve visited this blog before but after going through many of the articles I realized
    it’s new to me. Nonetheless, I’m certainly happy I came across it and I’ll be book-marking it and checking back frequently!

  20. I’ve been surfing online more than 2 hours today, yet I never found any interesting
    article like yours. It’s pretty worth enough for me.
    In my view, if all website owners and bloggers made good content as you
    did, the internet will be a lot more useful than ever before.

  21. http://tinyurl.com

    It’s amazing for me to have a web site, which is valuable designed for my experience.
    thanks admin

  22. tinyurl.com

    Today, while I was at work, my sister stole my iPad and
    tested to see if it can survive a thirty foot drop, just so
    she can be a youtube sensation. My apple ipad is now destroyed and
    she has 83 views. I know this is totally off topic but I had to share it with someone!