0

I have a question for you! I a made an ssh-key via github.Now i have two machines lets name them local1 and one remote1. from my local1 machine i made ssh-copy-id [email protected] and then i ssh to the remote1 host and everything works fine no warnings no nothing! But if i try to ssh from the remote1 to my local1 machine i get something like

The authenticity of host '192.168.x.xxx (192.168.x.xxx)' can't be established.
ECDSA key fingerprint is -----------------------------------------.
Are you sure you want to continue connecting (yes/no)?

Shouldn't I be able to connect from the remote1 machine to the local1 machine without this warning? I mean that i have already copied the ssh id Do i have to ssh-copy-id from remote1 to local1 too? thank you for your time guys!

1 Answer 1

0

There are two separate keys at play here.

When you use ssh-copy-id remote, you are copying the user key (identity) as an authorized_user on the remote machine. To use public-key authentication, you will need to ensure that an appropriate user public key is stored on each machine to which you wish to ssh.

The challenge you are receiving states that you cannot verify the host key of the machine local1 when connecting from remote1. If you answer yes at the prompt in your question, you will connect from remote1 to local1, and the publickey of local1 will be stored on remote1 so that you do not receive this challenge again. With default settings, you will receive this warning the first time you connect to any new machine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .