Ssh-copy-id Does not work on VIM4 and Edge Ubuntu server. This is a work around

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.

1 Like

Hello @foxsquirrel

Thanks for sharing~

But you mentioned ssh-copy-id doesn’t work? Could you share more information?

$ ssh-copy-id 

It just hangs

Please avoid using sudo.

I checked on my side, it works.

Client: VIM4 Ubuntu 22.04
Server: Ubuntu 18.04

  • On VIM4
ssh-keygen -t rsa
ssh-copy-id nick@xx.xx.xx.xx

That is good. Not sure what is up with it here.
If I find it will update the post.

Is your 18.04 on x86 or ARM?