I have been studying how to use ssh, but this has been bothering me and I will really appreciate any help.
When you generate public keys for users, they go to the ~/.ssh/authorized_keys . If you as root, want to take control of all users public keys, say you want to have a central location for all public keys. You want sshd to read all keys from a different location rather than ~/.ssh/authorized_keys.
How will you go about doing this?
Thanks for your help this.
you could control 'system wide' which file is used for authorized_keys verification adding a simple parameter to your sshd configuration (/etc/ssh/sshd_config):
of course, more details are available in 'man sshd_config'
You're welcome and enjoy your 'practice' ;-)
however, I forgot to mention that if you modify the /etc/ssh/sshd_config file, you should restart the sshd daemon.
$0.01: Restart the SSH daemon FROM ANOTHER SHELL to keep an active/running shell on the system, to recover, just in case.
$0.02: I suggest a two-steps approach to be sure that the sshd daemon is correctly restarted and the new ssh session is not picking up a thread that hasn't properly re-read the configuration
# svcadm disable ssh; sleep 5; svcadm enable ssh