Skip to content

Conversation

@karthik-vast-ai
Copy link
Contributor

No description provided.

Copy link
Contributor

@skiddar skiddar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok, but ssh-keygen may not be installed on all distros.

vast.py Outdated
# Generate the key pair if the public key does not exist.
if not os.path.exists(pub_key_path):
print("Generating a new RSA SSH key pair...")
subprocess.run(["ssh-keygen", "-t", "rsa", "-f", key_path, "-q", "-N", ""], check=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isn't this in a try catch block?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't do rsa. We don't need compatibility with 2010

vast.py Outdated
print("Unable to add SSH key to the agent. Make sure the ssh-agent is running.")

# List loaded keys to confirm.
subprocess.run(["ssh-add", "-l"], check=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try/catch block?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants