First thing, make sure you've generated keys on the client box. And then place your and everyone else's pubkeys in the target client user's home directory. I like to use authorized_keys2 for people, and authorized_keys for robots - that's just me.
One thing that you do need is connectivity of some sort between hosts. That being said:
server is the place where the keys are coming from.
client is the place where the keys are destined.
root@client: ~# ssh-keygen -t rsa -b 2048 root@client: ~# ssh -l you server "sudo bash -c \"cat /home/*/.ssh/id_rsa.pub\"" >> /root/.ssh/authorized_keys2 or... if you wish to merely cat: root@client: ~# ssh -l you server "sudo bash -c \"cat /home/*/.ssh/id_rsa.pub\"" >> /root/.ssh/authorized_keys2 or... on the system which you wish to cat pubkey from... you@server: ~# cat .ssh/id_rsa.pub | ssh root@client 'cat >> .ssh/authorized_keys2' ... If you never ever reboot them, VMWare ESXi hosts do obey pubkeys. root@esxi-client: ~# cd / root@esxi-client: ~# mkdir .ssh root@esxi-client: ~# chmod 600 .ssh do the last tip.
No comments:
Post a Comment