X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.core%2Fsrc%2Forg%2Fargeo%2Fssh%2FAbstractSsh.java;h=ae1d6a0d4acabf446948ccbfce60026140c1ef8b;hb=bc5e10532e11e384a47264fec26e8afe531654b6;hp=f42ae205cfe6cb24a5cbce137b90d3d0de0cc977;hpb=ca59ec5bdf16364159d8d826306c90762192e12c;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.core/src/org/argeo/ssh/AbstractSsh.java b/org.argeo.core/src/org/argeo/ssh/AbstractSsh.java index f42ae205c..ae1d6a0d4 100644 --- a/org.argeo.core/src/org/argeo/ssh/AbstractSsh.java +++ b/org.argeo.core/src/org/argeo/ssh/AbstractSsh.java @@ -14,7 +14,7 @@ import org.apache.sshd.client.SshClient; import org.apache.sshd.client.config.keys.ClientIdentityLoader; import org.apache.sshd.client.future.ConnectFuture; import org.apache.sshd.client.session.ClientSession; -import org.apache.sshd.client.subsystem.sftp.SftpFileSystemProvider; +import org.apache.sshd.client.subsystem.sftp.fs.SftpFileSystemProvider; import org.apache.sshd.common.config.keys.FilePasswordProvider; abstract class AbstractSsh { @@ -79,13 +79,13 @@ abstract class AbstractSsh { } void loadKey(String password, String keyPath) { - try { - KeyPair keyPair = ClientIdentityLoader.DEFAULT.loadClientIdentity(keyPath, - FilePasswordProvider.of(password)); - session.addPublicKeyIdentity(keyPair); - } catch (IOException | GeneralSecurityException e) { - throw new IllegalStateException(e); - } +// try { +// KeyPair keyPair = ClientIdentityLoader.DEFAULT.loadClientIdentity(keyPath, +// FilePasswordProvider.of(password)); +// session.addPublicKeyIdentity(keyPair); +// } catch (IOException | GeneralSecurityException e) { +// throw new IllegalStateException(e); +// } } void openSession(URI uri) {