To control SSH access based on location, I will use the GeoIP free database to determine the source IP address. Each time an external (non-local network) connection is initiated, the script will be executed by the SSH daemon to identify the region. If the region is not in the allowed list the connection will be…Continue reading →
From http://www.cs.utah.edu/~bigler/code/sshkeys.html Generate your key pair (do no enter password when prompted)
ssh-keygen -t rsa
Copy public key to remote server
Continue reading →
cat ~/.ssh/id_rsa.pub | ssh email@example.com 'cat >> .ssh/authorized_keys'
# If you need to make a .ssh directory on the remote machine
cat ~/.ssh/id_rsa.pub | ssh firstname.lastname@example.org 'mkdir .ssh; cat >> .ssh/authorized_keys'