Hi everyone.
I’m quite new to Linux/SSH/DigitalOcean so I might did something inpriopriate while configuration of nodes connections. I started to work with Swarm and decide to work with DigitalOcean. I’ve tried to follow instruction in tutorial about configuring nodes connections.
I’m working on Ubuntu 20.04 What have I already done?
Effect:
I can connect to the node with standard ssh root@{nodeIPAddress}
but when I try to
connect like ‘ssh node1’ then I receive an information ‘Permission denied (publickey)’.
What is interesting? When I try to connect to the node for the first time I receive message: 'The authenticity of host ‘node1 (nodeIp)’ can’t be established. ECDSA key fingerprint is SHA256:31{restOfFingerpring} Are you sure you want to continue connecting (yes/no/[fingerprint])? ’ But what I don’t understand is a fact that this particular fingerprint is not the same which I’ve generated in the begiinning (generating RSA key). I don’t know if ECDSA key fingerprint should be or not to be the same.
I’ve searched many website to somehow find out what is a problem, but with no effect (despite better understanding of ssh and protection :) ).
Thank you in advance for any ideas/help.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
I’ve found out what I did wrong. Problem was, that I’ve created ‘config’ file as a root in ~/etc/ssh/config instead of /home/username/.ssh/config. Now it works correct.