NetIM shell (netimsh) provides an option to reset the ssh keys. This should be run on all the nodes
reset ssh
Also same as
ssh reset
What this does is deletes the .ssh directory from the
/home/netimadmin location.
The following command needs be run only on the Manager since that node logs into all other nodes like in a Hub n Spoke model.
In order to restore it you need to run
ssh test
This will recreate the /home/netimadmin/.ssh directory on the other nodes and populate it with the relevant files.
The command ssh test can also be run on the nodes separately but then it will only repair the connection between the node and the Manager.
Running it on the Manager will repair it on all the nodes in the swarm.
A good measure will be
- To check the timestamp on the /home/netimadmin/.ssh directory
- Verify the swarm nodes IP addresses are present in the Managers /home/netimadmin/.ssh/authorized_keys file.
- Check the output of the
show nodes
command
In times when running the command from the Manager fails to repair the error, we need to run
ssh test from each individual node to fix it.