I do not want to start ssh-agent and ssh-add as described here to manage my ssh keys for password less login. How do I install keychain software to manage my keys running on a Debian or Ubuntu based cloud server? OpenSSH offers RSA and DSA authentication to remote systems without supplying a password. keychain is a manager for ssh-agent. The ssh-agent started by keychain is long-running and will continue to run, even after you have logged out from the system. However, you can control this behavior.

Installing keychain for Debian and friends

You can install keychain the key manager for OpenSSH using the apt-get from the command line over an ssh session for cloud based instance or any other regular vps or dedicated server. Type the following apt-get command as root user:$ sudo apt-get install keychain OR# apt-get install keychain Sample outputs:

How do I set up public key authentication?

First, create a directory called $HOME/.ssh/ using the mkdir command:$ mkdir $HOME/.ssh/ $ chmod 0700 $HOME/.ssh/ Type any one of the following command to to generate your public and private keys in $HOME/.ssh/ directory using RSA encryption:$ ssh-keygen OR$ ssh-keygen -t rsa -b 2048 OR$ ssh-keygen -t rsa Assign the pass phrase when prompted. You should see two new files in $HOME/.ssh/ directory:

############################################################################ allow $USER to use keys. Only enter once and it will remain enabled till# you delete it or reboot the server ###########################################################################/usr/bin/keychain $HOME/.ssh/id_rsa
source$HOME/.keychain/$HOSTNAME-sh

When you login, you will see the keychain managers as follows so that your shells and cron jobs can share a single ssh-agent process: