Browse Source

Ensure that JSch knows HostKeyAlgorithms ssh-rsa and ssh-dss

Without these registrations, JSch's up-front checks which algorithms
are available at all fail if the ssh config explicitly sets only these
algorithms.

Bug: 537790
Change-Id: Idb0431190a7f101913363ee95af6c8fcbda6c923
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
stable-5.0
Thomas Wolf 6 years ago
parent
commit
09753591fa
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java

2
org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java

@ -372,6 +372,8 @@ public abstract class JschConfigSessionFactory extends SshSessionFactory {
*/
protected JSch createDefaultJSch(FS fs) throws JSchException {
final JSch jsch = new JSch();
JSch.setConfig("ssh-rsa", JSch.getConfig("signature.rsa")); //$NON-NLS-1$ //$NON-NLS-2$
JSch.setConfig("ssh-dss", JSch.getConfig("signature.dss")); //$NON-NLS-1$ //$NON-NLS-2$
configureJSch(jsch);
knownHosts(jsch, fs);
identities(jsch, fs);

Loading…
Cancel
Save