spraguga wrote:
Sorry about all this as I am very unfamiliar with ssh keys. I was trying to do this in the terminal maybe I should be doing it via ARD. Currently all Clients have ARD access and SSH access active in System Preferences/Sharing. Evey client machine is authenticated with the same admin account that I use with ARD.
So should I be doing the following:
Run this on every Client machines via ARD UNIX command to create the key:
ssh-keygen -t dsa -f ~/.ssh/id_dsa -N ''
And then run this on every Client machines via ARD UNIX command to update the servers authorized_key file:
cat ~/.ssh/id_dsa.pub | ssh user@host 'cat - >> ~/.ssh/authorized_keys'
Is that it, am I missing anything?
I'm not familiar with ARD so I can't comment on that part. I can tell you that there is no need to create the keys on the clients. You can create all the keys for all the clients on a single machine - your machine. Instead of naming them "id_dsa", use something like "~/Documents/client_ssh_keys/client1". Write a script to go through and build them all in one swell foop. Then you can copy them all to the server's authorized_keys file.
You will have to copy the client1 and client1.pub files into .ssh/id_dsa and .ssh/id_dsa.pub on each client machine. It would also be a good idea to update the .ssh/known_hosts file on each client machine with the entry for the server. You can get this from your own known_hosts file. As long as you are on the client, copy your own public key into authorized_keys.
At this point, you can log in to every client machine and do so in a script, without a password. Each client can log in to the server without a password and run scripts.
Also what if the machine is logged in by another Client. Then this will not work, correct? Can I set it up so anyone who is logged into any Client machine can ssh in to the server. Would I just change the id_dsa location to root or top level of the server and client startup volumes?
SSH is an independent communication channel. No one needs to be logged in on any machine.
You can use the "-i" option on SSH to use a specific set of keys for communicating with a server. Sharing keys like that would be a significant security hole. You would definitely want to use a passphrase in that case.