O
O
Ord EO2020-06-01 07:16:16
SSH
Ord EO, 2020-06-01 07:16:16

How to copy ssh key to new system?

I have my laptop in which I have access to the server via ssh, I recently decided to switch completely to a stationary computer and simply copied the .ssh folder to access the server, but I couldn’t get access in this way, an error occurs

The authenticity of host 'имя хоста' can't be established.
ECDSA key fingerprint is SHA256:UUDyM0F3U3WU/Pkdrsdfo4aZxecdsffFpeyM5ZtQKpp5Qn3d7k.
Are you sure you want to continue connecting (yes/no)?

Tell the newbie if it is possible to somehow duplicate the ssh key on the second computer so that it would be possible to get access from it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
F
FanatPHP, 2020-06-01
@OrdeO

After copying, it is necessary to set the permissions of the key to 600
chmod 600 ~/.ssh/id_rsa
Well, as noted above, you must accept the host as trusted by pressing "yes"

V
Vladimir Kuts, 2020-06-01
@fox_12

Are you sure you want to continue connecting (yes/no)?

What if you just type "yes"?

L
Leroro, 2020-06-03
@Leroro

$ cat ~/.ssh/id_rsa.pub | ssh [email protected] 'cat >> ~/.ssh/authorized_keys'
or use ssh-copy-id from ssh folder

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question