Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fatal SSH starting error & correct comment #260

Merged
merged 3 commits into from
Jul 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.",
Expand All @@ -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(
Expand Down