I have just installed Ubuntu 22.04.1 LTS on a Desktop Computer with previous Windows 10. Now I want to connect to my server with ssh, but I don`t want to enter each time the password for the private key. On Windows I used Pagent from PuTTY (or Kagent from Kitty) to hold my private key. On my MacBook I used this command in the Terminal (as root):
eval `ssh-agent -s` && /usr/bin/ssh-add -K /path/to/private/key
and in that Terminal's tab I could use ssh to my remote server after I entered once the password for the PK. But on Ubuntu 22.04 I dont know how to do it.
If I try as on MacOS, following the How-To from GitHub Docs, I get an error:
f@f-comp-ubuntu:~$ sudo -s -H
[15.38.20][root@f-comp-ubuntu:/home/f#eval "$(ssh-agent -s)"
Agent pid 33293
[15.38.52][root@f-comp-ubuntu:/home/f#ssh-add -K /my/key
Enter PIN for authenticator:
Provider "internal" returned failure -4
Unable to load resident keys: device not found
(My key is 600 and root:root)
How can I add my private key in the Terminal with ssh-add?
Thanks.frank