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

Adding SSH public key doesn't seem to work #313

Open
Prodeguerriero opened this issue Aug 31, 2024 · 9 comments
Open

Adding SSH public key doesn't seem to work #313

Prodeguerriero opened this issue Aug 31, 2024 · 9 comments

Comments

@Prodeguerriero
Copy link
Contributor

Hi there,

I have tried to add my SSH key to my ChimeraOS installation (running on a Framework 13 laptop with AMD APU), but even though I don't get any error message from the UI, the “transfer” doesn't appear to work.
The ssh call works, and I can add the target machine's fingerprint to my known_hsots file, but then I am greeted by [email protected]: Permission denied (publickey).

I have had a look inside the .ssh folder of the gamer user by using TTY, and I don't see the authorized_keys file in there.

I am running the OS on a laptop, so having SSH access for me isn't exactly critical. But I thought I would flag it nonetheless. Let me know if I can help by looking further into the matter.

@alkazar
Copy link
Member

alkazar commented Sep 1, 2024

Is the key listed in the web app? Perhaps you didn't click the "Save" button?

@Prodeguerriero
Copy link
Contributor Author

Prodeguerriero commented Sep 1, 2024

Is the key listed in the web app? Perhaps you didn't click the "Save" button?

The key is not listed in the web app. I did click the save button. I'll try again later today, just to confirm.

EDIT: might be worth pointing out that other features work. I was able to install games from my Epic and Gog libraries, for example. And I configured a fixed login password.

@alkazar
Copy link
Member

alkazar commented Sep 1, 2024

What kind/type of key did you upload? There may be some that do not work.

@Prodeguerriero
Copy link
Contributor Author

It's a Ed25519 key generated with 1Password. Did I miss the requirement somewhere?

@Prodeguerriero
Copy link
Contributor Author

I have just tried with an RSA key, still nothing. And I have tested this with Firefox and Chrome.

@alkazar
Copy link
Member

alkazar commented Sep 1, 2024

I was able to reproduce if I copied the key without the label/id. Make sure to copy the full contents of the public key file.

@Prodeguerriero
Copy link
Contributor Author

Prodeguerriero commented Sep 1, 2024

Bingo, the problem was the missing [comment] in the public key. Thanks!

Now that we are at it, I think it is worth pointing out that 1Password generates public keys that do not have a comment. A bit of a corner case, I know. But still, it might not be the only password manager that does this.

If you point me in the right direction, I could look at the documentation and update it. Or even look at the code and build error handling for this use case. If you are fine with others poking around in the codebase, that is. I found the documentation, I'll start there.

@alkazar
Copy link
Member

alkazar commented Sep 1, 2024

Oh, that is good to know. I suppose we can detect when it is missing and add one automatically. Or maybe it is not even needed? I am not sure. The validation is quite basic and can be found here:
https://github.com/ChimeraOS/chimera/blob/master/chimera_app/ssh_keys.py#L92

@Prodeguerriero
Copy link
Contributor Author

I think the easiest thing to do is to edit the documentation to mention that a comment is needed. Knowing that requires a simple copy/paste exercise to work around the requirement.

I say this mainly because the comment appears to be what the UI/web page uses when listing the added keys.

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