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

Check fingerprint #2

Merged
merged 1 commit into from
Jul 31, 2023
Merged

Check fingerprint #2

merged 1 commit into from
Jul 31, 2023

Conversation

rukai
Copy link
Member

@rukai rukai commented Jul 20, 2023

Previously when manually connecting to an instance, ssh would pop up a message like this:

rukai@memes foo$ TERM=xterm ssh -i key [email protected]
The authenticity of host '18.204.219.189 (18.204.219.189)' can't be established.
ED25519 key fingerprint is SHA256:qGAC8ry5iMndcPb3lxy/o6PmoEA3gjCDk/zofJMP/lE.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?

There was no way to actually check the fingerprint, so instead we would just accept it, leaving us open to MitM attacks.
This PR does the following:

  • exposes public methods to retrieve the host public key in useful formats in case the user wants to connect with their own ssh client.
  • alters the bash script emitted by ssh_instructions to perform checking of the fingerprint
    • unfortunately openssh is silly and the only way to do this is to create a temporary known_hosts file but it works

@rukai rukai merged commit 7d6da3b into shotover:main Jul 31, 2023
3 checks passed
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.

3 participants