简体   繁体   中英

Do I need to add new public key to the server after converting private key from PuTTY to OpenSSH format?

I'm using JSch connect to a server. I'm converting my private key to the OpenSSH because this is what is needed (so I'm told). My two questions are:

  1. How should I name this OpenSSH file?
  2. Does this converted file also have to be added to the server similar to when adding the private key generated when connecting using PuTTY?

The name of the key pair file does not matter, as you explicitly tell JSch the path to the file. All the JSch cares for is the contents.

Though a convention is to use id_dsa or id_rsa .


If you convert the key pair file from one format (eg PuTTY/.ppk) to another (eg OpenSSH) and you can authenticate using the key in the original format, you do not need to add a new public key to the server. Because there's no new public key. The key pair (both the private key and the public key) is still the same. All that changes is the format how the key is stored in the file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM