Unable to SSH to worker nodes from master

I am able to ssh to the master node, but cannot ssh into the worker nodes from master

$ ssh docker@
The authenticity of host ‘’ can’t be established.
RSA key fingerprint is SHA256:ZGd+H5Kw2+8S8VIZfOTNV8BEc5u4faIisqBJPLUC1Kc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘’ (RSA) to the list of known hosts.
Permission denied (publickey,keyboard-interactive).

do I need to add my private key to the master node before attempting this?

@k1ck3rtw When you SSH into the master nodes, do you have SSH key forwarding correctly set up? You can get specific instructions on how to set up forwarding of SSH keys depending on your SSH client at https://docs.docker.com/docker-for-azure/deploy/ under the section "Using SSH agent forwarding”

I tried following these instructions on one of my master nodes and ran into all sorts of issues.
One, the worker nodes can’t be reached using the hostname only the IP.
Two, ssh-add -L reports "Could not open a connection to your authentication agent.
After Googling this last error i used eval $(ssh-agent) then was able to run the ssh-add command.
I received “The agent has no identities” so I continued to add the key.
The only keys in ~/.ssh was something called “authorized_keys” but I’m not sure this is the key I need to add to get to my worker nodes.

Am I supposed to upload my key to the master node then add it to ssh-add?

UPDATE: Finally found a solution for mi case:

My key was not in pageant: add your key to pageant fixed it.


Hi,

I’m having the same issue, perfectly described by bmmathe. SSH forwarding seems to be working, since SSH_AUTH_SOCK is defined in the manager env.

In my case, I’m using an AWS CloudFormation created Docker swarm, no problems logging into the manager with ‘docker’ as user, and valid ssh key through Putty in Windows. Trying to connect to the nodes refuses connection.

At this moment I’m considering ssh forwarding or authorized_keys are not properly configured in the nodes using the AWS template provided in the tutorial.

Thanks,
Sam.