0

I can add a passwordless id_ed25519 file locally using ssh-add -k, but not on my remote server.

Locally:

☁  ~  ssh-add -l
The agent has no identities.
☁  ~  ssh-add -k ~/.ssh/id_ed25519
Identity added: ~/.ssh/id_ed25519 ([email protected])
☁  ~  ssh-add -l
256 SHA256:.... [email protected] (ED25519)

Locally my OS is not bothered that this is a passwordless key, and does not prompt for a password. On the remote server I get prompted for a password and when I hit ENTER on the empty line for the passwordless key, the process exits and nothing is added:

On my remote server, I can't add the same key in the same way:

[app@... ~]$ ssh-add -l
The agent has no identities.
[app@... ~]$ ssh-add -k ~/.ssh/id_ed25519 
Enter passphrase for /home/app/.ssh/id_ed25519: 
[app@... ~]$ ssh-add -l
The agent has no identities.

I don't understand what has changed particularly, since this used to work on my server, albeit with a different key (recently changed from rsa to ed25519).

I don't want to set this up a key with a password as this is part of a fix for an automated process that used to work. I want to know why ssh-add might be having problems on one machine and not the other, with the same key.

1 Answer 1

0

The answer appeared when I tried ssh -vT: debug1: key_parse_private2: no end marker

My private key on the remote server did not include the line -----END OPENSSH PRIVATE KEY-----. Once I added it everything started behaving normally.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .