With a few custom configuration settings, and creative use, ssh can make it very easy to manage multiple computers.
Keys can eliminate the need to enter passwords every time you connect between two specific computers.
To create a public/private key pair:
ssh-keygen -t rsa
Use the default file and no passphase to save future typing. Copy the public key to the server's file:
Then to create quick logins:
make a shell file called ssh-to with
ssh `basename $0` $*
Or, to support non-default ports:
# get the host to ssh to
# check for a port number after :
# ext will match the host name if there's no port
if [ "$ext" == "$host" ] ; then
# no special port requested
ssh $host -X $*
# set the port to what is after : and remove :port from host name
ssh $host -X -p $port $*
Then link to this shell file with the network name of the target computer. Example,
ln -s ssh-to myserver.domain.com
Now you will be able to connect just by entering the computer's name on the command line.
To remove a known host key when there is a change such as the host's IP address:
ssh-keygen -R host.example.com
To support multiple hosts at one target IP address (on different ports) add to the ssh_config file separate Host sections like:
Host server1 server1.domain.com