diff --git a/src/main/java/com/osiris/autoplug/client/configs/SSHConfig.java b/src/main/java/com/osiris/autoplug/client/configs/SSHConfig.java index f8f9ce3..60903d0 100644 --- a/src/main/java/com/osiris/autoplug/client/configs/SSHConfig.java +++ b/src/main/java/com/osiris/autoplug/client/configs/SSHConfig.java @@ -10,8 +10,6 @@ import java.io.IOException; -import org.jline.utils.OSUtils; - import com.osiris.autoplug.client.tasks.SSHManager; import com.osiris.dyml.Yaml; import com.osiris.dyml.YamlSection; @@ -93,9 +91,7 @@ public SSHConfig() throws IOException, DuplicateKeyException, YamlReaderExceptio "The generated file will be a .pub file, which contains the public key.", "Example connection command: `ssh -i /path/to/private/key username@server-ip-address`"); - - String sshPath = OSUtils.IS_WINDOWS ? "%USERPROFILE%\\.ssh\\id_rsa" : "~/.ssh/id_rsa"; - server_private_key = put("server-private-key") + server_private_key = put(name, "server-private-key") .setComments( "The private key used by the server to authenticate itself to the SSH console.", "The file must be in the OpenSSH format.", @@ -105,7 +101,7 @@ public SSHConfig() throws IOException, DuplicateKeyException, YamlReaderExceptio "In the same directory as the private key, there will also need to be a file with the same name and a .pub extension, which contains the public key.", "NOTICE: The .ssh directory is not present by default, and must be created via the usage of the 'ssh-keygen' command.", "Example:", - "server-private-key: " + sshPath); + "server-private-key: ./autoplug/id_rsa"); username = put(name, "username").setDefValues("autoplug") .setComments(