LuisEnMarroquin / setup-ssh-action

GitHub Action that sets up your SSH key on the Virtual Environment
https://github.com/marketplace/actions/setup-ssh-action
MIT License
7 stars 5 forks source link

Unable to Connect via SSH #4

Open dasundev opened 6 months ago

dasundev commented 6 months ago

I generated an SSH key using the following command:

ssh-keygen -t ed25519 -C "hello@dasun.dev"

After setting up the GitHub Action and running it, I encountered the following error:

[dasun]: Load key "/home/runner/.ssh/access": error in libcrypto
[dasun]: ***@***: Permission denied (publickey).
LuisEnMarroquin commented 3 days ago

Hi, it should work with any key supported, and ed25519 should be supported, can you share your workflow file?

Else can compare with this file that I am using to test this repo on every commit: https://github.com/LuisEnMarroquin/setup-ssh-action/blob/main/.github/workflows/ubuntu.yml

N1ebieski commented 2 days ago

I had the same issue. In my case, the problem was with the new key format. You can recognize such a key by the fact that it has -----BEGIN OPENSSH PRIVATE KEY-----at the beginning.

You need to convert this key by PuTTYgen to the old PEM format. Then it has: -----BEGIN RSA PRIVATE KEY----- and works.

LuisEnMarroquin commented 1 day ago

Was it on Windows? I think windows has some limitations regarding key formats

N1ebieski commented 1 day ago

No. Key was originally generated on Debian 10 by the command: ssh-keygen -t rsa -b 4096 -C "email@example.com".