Reputation: 33
i want a java application to establish a remote connection using ssh.
i came across the libraries jsch and ganymed, which seem pretty good, but unfortunately don't support private keys generated by puttygen. i have read that you can also generate non-proprietary keys using puttygen, generating new keys or converting the old keys is no option in this case.
so... does anyone know any ssh library for java that supports those keys?
thanks a million!
Upvotes: 3
Views: 2087
Reputation: 10931
For those returning to this thread ... recent versions of JSch now support PuTTY .ppk files. They can be loaded with JSch.addIdentity()
in the normal way.
Just be aware if the PPK is password protected you will likely need to add the JCE unlimited strength jars to the JRE to support the aes256-cbc cipher: https://stackoverflow.com/a/20072135/1794485
Upvotes: 0
Reputation: 80340
You will have to convert the keys to OpenSSH format: How to convert SSH keypairs generated using PuttyGen(Windows) into key-pairs used by ssh-agent and KeyChain(Linux)
Upvotes: 5