SSH keys, for those hard to reach places
This was the interesting one. Since our network philosophy is based on paranoia,
I could not get any easy access to the webserver machine. However, I could if I used ssh.
Not having used ssh before though, I had to understand how it works.
First, you need to make yourself a set of private and public keys. If you do not already have a
.ssh directory in your home directory, go and make one. The go there and make your keys:
ssh-keygen -b 1024 -f mykey -t dsa
LEAVE THE PASSWORD BLANK so you can use the key from a script.
If your authentication setup does not use dsa, then use the other type.
Some versions of ssh-keygen use a -d flag which is equivalent to -t dsa.
Ok, this will generate you keys.
These keys could be anywhere but it seems like a good idea to keep your keys in one place.
You will be loging in to the remote machine as a particular user, say user.
Now, copy the public key ONLY in ~/user/.ssh on the remote machine.
Then depending on the type of key you generated,
append the public key to the authorized_keys (non dsa keys)
or authorized_keys2 (dsa keys) file. These files may or may not be there. If you went to the remote machine, via ssh, then they should be there (duh!).
Now you should be ready to try loging in from the local machine to the webserver, try:
ssh -i ~/.ssh/mykey user@remotehost
it should have logged you in provided your ssh setup allows no-password keys.
If any this did not work, I cannot help, read about ssh, search Google groups.