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

ssh_public_key input is misleading #33

Open
diericx opened this issue Apr 26, 2023 · 1 comment
Open

ssh_public_key input is misleading #33

diericx opened this issue Apr 26, 2023 · 1 comment

Comments

@diericx
Copy link

diericx commented Apr 26, 2023

I ran into these errors while trying to set up the connection

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

And

load pubkey "/github/home/.ssh/id_rsa": invalid format

What this script does is appends the host value and the ssh_public_key value to a new line in the known_hosts file here

printf '%s %s\n' "$SSH_HOST" "$INPUT_SSH_PUBLIC_KEY" > /etc/ssh/ssh_known_hosts

So like other issues have mentioned, if you look at your own ~/.ssh/known_hosts file on a local computer that has connected to the server you will see something like this:

1.2.3.404 ssh-rsa LONGKEYHERE

What you really want to do is take everything after the IP as that is being added on later. So the value will look like this:

ssh-rsa LONGKEYHERE

I think that is pretty confusing. What is the rationale for not simply letting the user put the ip in the key secret variable? To hit other hosts with the same key?

@diericx diericx changed the title Public key input is misleading ssh_public_key input is misleading Apr 26, 2023
@XDynames
Copy link

XDynames commented Mar 3, 2024

Insanely helpful +1

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

No branches or pull requests

2 participants