Linux – How to set up password-less SSH for all users

linuxremotessh

I can set up password-less SSH for a single user by doing the following:

1) Generate RSA key pair for the local machine in ~/.ssh

2) Copy the local machine's public key to the remote machine's ~/.ssh/authorized_keys

But is there a way to do this action for all users? Perhaps doing the same steps as above in /root/.ssh or something? Or is there a good way for root user to deploy keys and modify authorized_key lists in every users' ~/.ssh directory?

Thanks.

Best Answer

If you want to provide password-less access for all users to a single remote host, then OpenSSH supports host-based public key authentication that user's the host key of the client to authenticate to the server and /etc/ssh/shosts.equiv to authorize users.

There is a good guide on how to configure it here: http://en.wikibooks.org/wiki/OpenSSH/Cookbook/Host-based_Authentication

Related Question