Page 1 of 1

Sharing ssh keys

PostPosted: 2019-03-19 14:30
by Munty Scruntfundle
Next question for the day...

If have 128 debian/raspbian nodes on a closed network. This is going to be a collaborative cluster, usually you would have a header node and a load of slaves, but I'm trying to do something different.

I want every node to have access to every node. I'm sharing data in all sorts of ways and some of it requires ssh instructions.

So. Is there any easy way to create keys and share them all within the cluster? If not it's going to take days!!

Many thanks.

Re: Sharing ssh keys

PostPosted: 2019-03-19 16:13
by arzgi
There is ssh-copy-id, which helps shearing keys. I've only used it to one host at time, but you could write a script, which would in loop read one host from file, and call ssh-copy-id whit it.

Fortunately ssh-copy-id -n is try run option. I leave it to you to test, will it halt the script when it tries to copy keys to itself. That would make it bit more challenging, but not too demanding.