You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
cant connect to remote host when having ed25519 keys due to bug in jsch.
To Reproduce
add a ssh ed25519 key and "IdentityFile ~/.ssh/id_ed25519" to your ssh config.
open debugger and "GNU gdb via ssh"
ssh connection will fail will the following exception:
Caused by: com.jcraft.jsch.JSchException: invalid privatekey: [B@e4487af
at com.jcraft.jsch.KeyPair.load(KeyPair.java:664)
at com.jcraft.jsch.KeyPair.load(KeyPair.java:561)
at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:40)
at com.jcraft.jsch.JSch.addIdentity(JSch.java:407)
at com.jcraft.jsch.JSch.addIdentity(JSch.java:367)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getJSch(JschConfigSessionFactory.java:276)
at org.eclipse.jgit.transport.JschConfigSessionFactory.createSession(JschConfigSessionFactory.java:220)
at org.eclipse.jgit.transport.JschConfigSessionFactory.createSession(JschConfigSessionFactory.java:176)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:110)
Expected behavior
can connect to remote host.
Workaround
use /etc/ssh/ssh_config and/or remove ed25519 keys.
Describe the bug
cant connect to remote host when having ed25519 keys due to bug in jsch.
To Reproduce
Caused by: com.jcraft.jsch.JSchException: invalid privatekey: [B@e4487af
at com.jcraft.jsch.KeyPair.load(KeyPair.java:664)
at com.jcraft.jsch.KeyPair.load(KeyPair.java:561)
at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:40)
at com.jcraft.jsch.JSch.addIdentity(JSch.java:407)
at com.jcraft.jsch.JSch.addIdentity(JSch.java:367)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getJSch(JschConfigSessionFactory.java:276)
at org.eclipse.jgit.transport.JschConfigSessionFactory.createSession(JschConfigSessionFactory.java:220)
at org.eclipse.jgit.transport.JschConfigSessionFactory.createSession(JschConfigSessionFactory.java:176)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:110)
Expected behavior
can connect to remote host.
Workaround
use /etc/ssh/ssh_config and/or remove ed25519 keys.
Screenshots
see attachment.
Attachments
https://stackoverflow.com/questions/53134212/invalid-privatekey-when-using-jsch
Environment (please complete the following information):
Build Date: 2022-Jan-25 1526 EST
Ghidra Version: 10.1.2
Java Home: /Library/Java/JavaVirtualMachines/openjdk17-temurin/Contents/Home
JVM Version: Eclipse Adoptium 17.0.1
OS: Mac OS X 11.2 x86_64
The text was updated successfully, but these errors were encountered: