So I have been trying to build ssh connections between google cluster container containing 1 master node and 2 worker nodes. I have used ssh-keygen to generate key pairs for all three nodes, send the two private keys of the 2 workers to the master node and into the .ssh/autherized_keys file. Then I shared this file with the two worker nodes too.
This approach makes successful ssh connections right after. The ssh connection was fine and I could also use scp to send over files. Yet as in later stages as I logout and re-login into the VMs, the ssh connection became very unstable, as sometimes it returns connection failure error : Permission denied (publickey), while sometimes the connection could be again triggered.
Anyone knows what the problem is? Thanks in advance!
ssh -v thehostnameyouwanttoconnectto.com
?