Use Argeo TP v2.1.23
[lgpl/argeo-commons.git] / org.argeo.core / src / org / argeo / ssh / AbstractSsh.java
index f42ae205cfe6cb24a5cbce137b90d3d0de0cc977..ae1d6a0d4acabf446948ccbfce60026140c1ef8b 100644 (file)
@@ -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) {