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 key extraction doesn't work with ssh-import-id #196

Open
Noratrieb opened this issue Feb 5, 2024 · 0 comments
Open

SSH key extraction doesn't work with ssh-import-id #196

Noratrieb opened this issue Feb 5, 2024 · 0 comments

Comments

@Noratrieb
Copy link

Noratrieb commented Feb 5, 2024

I used ssh-import-id-gh Nilstrieb which results in
/root/.ssh/authorized_keys containing

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG0n1ikUG9rYqobh7WpAyXrqZqxQoQ2zNJrFPj12gTpP Nilstrieb@github/87124356 # ssh-import-id gh:Nilstrieb

Then running sed -E 's/^.*((ssh|ecdsa)-[^[:space:]]+)[[:space:]]+([^[:space:]]+)([[:space:]]*.*)$/\1 \3\4/' /root/. ssh/authorized_keys (the sed monster extracted from

&& keys=$(sed -E 's/^.*((ssh|ecdsa)-[^[:space:]]+)[[:space:]]+([^[:space:]]+)([[:space:]]*.*)$/\1 \3\4/' "$trypath") \
) over it returns this:

ssh-import-id gh:Nilstrieb

not exactly what we want.

On Contabo Ubuntu 22.04 running sed (GNU sed) 4.8

@Noratrieb Noratrieb changed the title SSH key extraction doesn't work SSH key extraction doesn't work with ssh-import-id Feb 5, 2024
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

1 participant