How To Use Putty with an SSH Private Key Generated by OpenSSH

I have access to a remote server where I am only allowed to login via SSH with a key, and I can’t add an extra key by myself, as described in “No Password SSH” post. The private key (RSA) has been generated with ssh-keygen in Linux, and I can login from Linux without issue.

This morning, I wanted to do the same with Putty in Windows XP, so I just copied the private key to Windows and loaded it in Putty, but it failed:


After a few minutes of research, I found my answer on UbuntuForums, and the reason it fails is because Putty does not support openssh keys, but uses its own format.

Here’s what I had to do:

  1. Convert OpenSSH private key to Putty private key with Putty Key Generator (puttygen)
    Start puttygen, and click on Conversions->Import key, then click Browse and select the private key generated with openssh (e.g. id_rsa).
    Then click on Save private key (e.g. id_rsa_putty.ppk)
  2. Putty SSH login with private key.
    Now you can start Putty, enter the machine IP address or url as usual, then go to Connection->SSH->Auth.
    Click Browse, and select your private key file (e.g. id_rsa_putty.ppk), go back to Session and save the session. You should now be able to login to the server.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值