OS: Ubuntu server / jammy
VIM4 and Edge
Manually adding key.
On the server:
$ mkdir -p ~/.ssh
$ echo public_key_string >> ~/.ssh/authorized_keys
Now the rsa-key from the client needs to be manually transferred to the authorized keys file on the server.
This assumes you have already done ssh-keygen and have a key on the client.
On the client:
$ cat ~/.ssh/id_rsa.pub
Its easy to do if you remote into the server from the client and use 2 shell windows and copy and paste.
On the server:
$ sudo nano ~/.ssh/authorized_keys
in that file and below authorized_keys
paste the “rsa-key”. Use “ctrl and o” to write the key information then use “ctrl and x” to exit nano.
Now you can log in without using a password.