ssh invalid privatekey

Moderators: Vladimir Kondratyev, Anton Katilin

Post Reply
Posts: 1
Joined: Wed May 11, 2022 4:37 pm

ssh invalid privatekey

Post by albersma »

I want to connect to remote server to profile a running tomcat.
I haven chosen "Profile remote Java EE Server or application",
then used the Advanced option of "Application discovery method".
then I entered the hostname, ssh user and my private ssh-key and clicked on "Test Connection".

Then I got the error: "Error. Failed to authenticate to ..."
The log file says:
22.3-100 335.818: com.jcraft.jsch.JSchException: invalid privatekey: [[email protected]
at com.jcraft.jsch.KeyPair.load(
at com.jcraft.jsch.KeyPair.load(
at com.jcraft.jsch.IdentityFile.newInstance(
at com.jcraft.jsch.JSch.addIdentity(
at java.base/
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.base/java.util.concurrent.ThreadPoolExecutor$

But my private key file is exactly the same, which I use when connecting manually via ssh command, which works.
What's wrong here?
Anton Katilin
Posts: 6130
Joined: Wed Aug 11, 2004 8:37 am

Re: ssh invalid privatekey

Post by Anton Katilin »

Perhaps its format is unsupported and you'll need to re-generate/convert the key: ... using-jsch
Post Reply