Question
Problem with DNS connection to the node from Linux
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?
- I’ve generated my RSA keyPairs,
- I’ve generated 3 nodes in digital ocean with adding my public key during setup,
- To avoid using nodes IP adresses, I’ve configured my local DNS server by adding to ’ home/etc/hosts’ values: {node1IP} node1 … (What I’ve found this is a necessary to use in the future something like ‘ssh node1’ instead of 'ssh root@{node1IPAdress}’)
- According to tutorial (link at the beginning), I’ve created /etc/ssh/config file with content like: Host node1 HostName node1 User root …{node2, and 3 the same}
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.
×