From 1af5f2c9286ca8ea4f4e52f04de8136746e2b966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Prante?= Date: Wed, 16 Nov 2022 17:50:30 +0100 Subject: [PATCH] test ed25519 public key --- .../test/java/org/apache/sshd/fs/test/SFTPFileSystemTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files-sftp-fs/src/test/java/org/apache/sshd/fs/test/SFTPFileSystemTest.java b/files-sftp-fs/src/test/java/org/apache/sshd/fs/test/SFTPFileSystemTest.java index 70e09fc..b1acb68 100644 --- a/files-sftp-fs/src/test/java/org/apache/sshd/fs/test/SFTPFileSystemTest.java +++ b/files-sftp-fs/src/test/java/org/apache/sshd/fs/test/SFTPFileSystemTest.java @@ -39,7 +39,7 @@ public class SFTPFileSystemTest { env.put("username", "joerg"); URI uri = URI.create("sftp://xbib.org"); SshClient sshClient = ClientBuilder.builder().build(); - Path privateKey = Paths.get("/Users/joerg/.ssh/id_ed25519"); + Path privateKey = Paths.get(System.getProperty("user.home") + "/.ssh/id_ed25519"); KeyPairProvider keyPairProvider = new FileKeyPairProvider(privateKey); keyPairProvider.loadKeys(null).forEach(sshClient::addPublicKeyIdentity); for (String keyType : keyPairProvider.getKeyTypes(null)) { @@ -50,6 +50,7 @@ public class SFTPFileSystemTest { sshClient.setNioWorkers(1); sshClient.start(); SftpFileSystem fileSystem = new SftpFileSystemProvider(sshClient).newFileSystem(uri, env); + fileSystem.close(); // ... sshClient.stop(); }