Allowing users to logging in with keys
I'm doing more and more work with SSH keys so I thought I'd share this little program with you. When I create a development server I set up SSH keys so that I'm not constantly typing in passwords as I copy stuff around. After creating a new virtual machine I copy the public keys from my other machines over to the ~/.ssh
folder on the new machine then I run the following program:
#!/bin/bash
cat *.pub > authorized_keys
This scoops up all the public keys into an authorized_keys
file, effectively making them active.
I call this program ~/.ssh/00_mk_authorized_keys.sh
and I place it next to all the uploaded public keys so that I don't forget to run it when I'm uploading my new keys.
No feedback yet
Form is loading...