Problem Using SSH keys and Eclipse’s REmote System Explorer

2 minute read

I use the program Eclipse for editing website files on a server. We recently beefed up security on the server by disabling password logins and instead only allow SSH login with an SSH key. But once we enabled that, I could no longer use Eclipse to SSH into the server. I started getting an error saying “Auth fail”.

Original Setup

First off, some back story on how I had previously setup the SSH key with the server. I generated the SSH key locally by using SSH key-gen command on my local machine. I then uploaded it to the server, like I described in my previous post (I followed my own instructions).

Up until that point, though, I had always used password authentication in Eclipse’s Remote System Explorer. So once we disabled password logins, Eclipse wouldn’t work for me anymore.

Problem Symptoms

When I tried SSH’ing in with Eclipse I was getting the error

Auth Fail

I followed these instructions to make sure Eclipse knew which SSH key to use, but the error didn’t go away.

THe Underlying Issue

This ancient forum post pointed me to some more debug info in Eclipse’s log file (Help > About > Installation Details : View Error Log). In there I saw the culprit:

!ENTRY org.eclipse.jsch.core 4 0 2020-12-11 11:27:14.207
!MESSAGE An error occurred loading the SSH2 private keys
com.jcraft.jsch.JSchException: invalid privatekey: [B@436797be
	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 com.jcraft.jsch.JSch.addIdentity(
	at org.eclipse.jsch.internal.core.Utils.loadPrivateKeys(
	at org.eclipse.jsch.internal.core.JSchCorePlugin.loadPrivateKeys(
	at org.eclipse.jsch.internal.core.JSchProvider.createSession(
	at org.eclipse.rse.internal.connectorservice.ssh.SshConnectorService.createSession(
	at org.eclipse.rse.internal.connectorservice.ssh.SshConnectorService.internalConnect(
	at org.eclipse.rse.core.subsystems.AbstractConnectorService$
	at org.eclipse.rse.core.subsystems.AbstractConnectorService$
	at org.eclipse.rse.core.subsystems.AbstractConnectorService.connect(
	at org.eclipse.rse.ui.operations.SystemFetchOperation.ensureConnected(
	at org.eclipse.rse.ui.operations.SystemFetchOperation.execute(
	at org.eclipse.rse.ui.view.AbstractSystemViewAdapter.fetchDeferredChildren(
	at org.eclipse.ui.progress.DeferredTreeContentManager$

I was like, “how dare you call my private key invalid! I’m using with other programs just fine!”

I then searched for that error which led me to an article that pointed out that SSH key-gen command, at some point, started producing SSH keys that Eclipse (or rather, its Java library that it uses) couldn’t understand.

The important takeaway

The root cause was discovered to be the ssh private key mismatch. The exception only happened for users with key of newer kind ed25519, which outputs this key header:


instead of kind RSA:


regenerating an RSA key (ssh-keygen -t rsa), made the exception go away.

Stack Overflow user Natan,

So I needed a different SSH key.

Fixing It

So I copied my private and public keys, then used ssh-keygen -f carbon60_id_rsa -m pem to convert the originals to this older style of SSH key. I then re-uploaded the public key to the server, and then Eclipse’s remote system explorer started working again.

Leave a Reply