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 failed to authenticate #260

Closed
jpnadas opened this issue Mar 30, 2019 · 6 comments
Closed

ssh-key failed to authenticate #260

jpnadas opened this issue Mar 30, 2019 · 6 comments

Comments

@jpnadas
Copy link

jpnadas commented Mar 30, 2019

Hi,

I am having trouble with authenticating my ssh-key and I am getting the error:

Failed to authenticate SSH session: Unable to extract public key from private key file: Wrong passphrase or invalid/unrecognized private key file format.

I generated the ssh key on my laptop via ssh-keygen and added it to the app via the qrcode scanner.

The way I generated the qrcode was cat ~/.ssh/id_rsa | qrencode -o code.png

When I attempt to clone the repo I get the aforementioned error.

I am sure the passphrase is correct. I even attempted to create a new key with a new passphrase and got the same result.

@yishilin14
Copy link
Collaborator

yishilin14 commented Mar 30, 2019

As far as I could remember, I tried to encode my SSH keys in a single QR code, Pass was not able to scan it. I don't remember whether it was because a single QR code cannot encode that many information, or the QR code was too complicated to get scanned correctly.

You can try this simple tool to generate qr codes: https://github.com/yishilin14/asc-key-to-qr-code-gif. It works for both PGP keys and SSH keys. It generates a gif with two pictures in it given my SSH key.

@jpnadas
Copy link
Author

jpnadas commented Mar 30, 2019

Thanks for the suggestion. I had seen this option, but I could not find its dependence on the AUR and I prefer to avoid compiling from source when possible.

I will give it a go anyways just to see if that solves the issue.

Cheers.

@yishilin14
Copy link
Collaborator

It's just one shell script. I guess you could find all three common dependencies on the AUR.

Basically, it splits your key file into two or more pieces and generates one png for each split. Then you could use Pass to scan those png in sequence. You could do all these manually.

@jpnadas
Copy link
Author

jpnadas commented Mar 30, 2019

I have generated the gif with the asc-key-to-qr-code-gif script as suggested, but the result is the same.

In fact, scanning the image generated from cat ~/.ssh/id_rsa | qrencode -o code.png adds the same information to the ASCII-ARMOR ENCRYPTED PRIVATE KEY field on the app.

Also, I tried creating a new ssh key without password and the result is still the same.

I don't think the issue is the qrcode.

@kraem
Copy link

kraem commented Mar 30, 2019

@jpnadas did you try generating the keys with puttygen as per #218 (comment) ?

@jpnadas
Copy link
Author

jpnadas commented Mar 31, 2019

@kraem it worked! Thank you so much!

@jpnadas jpnadas closed this as completed Mar 31, 2019
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

3 participants