On Thu, 9 Nov 2023 at 12:58, Jonathan McDowell noodles@earth.li wrote:
Try "ssh-add -l"
Responds "The agent has no identities" which sounds right.
ssh-add -c <path to your privatekeyfile> ssh HostA
$ ssh-add -c /path/to/my/key Enter passphrase for /path/to/my/key (will confirm each use): Identity added: /path/to/my/key (/path/to/my/key) The user must confirm each use of the key $ ssh user@host.example.co.uk sign_and_send_pubkey: signing failed for RSA "/path/to/my/key" from agent: agent refused operation user@host.example.co.uk: Permission denied (publickey).
What am I doing wrong?
If I drop the "-c" it works - and that's allowed me to transfer the files I need, but I agree that password prompting would be preferred.
It happens that I use the same key for accessing both these servers, but if I used different ones would this still work (assuming I'd added both using ssh-add before I connected)?
The files will go between A + B, only the initial authentication bit comes back to your local PC.
Perfect!