To install keychain, a manager for the ssh-agent
on a CentOS 6 or CentOS 7 system, you can use the following steps:
rpmforge
repository:sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm sudo rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
This will install the rpmforge
repository, which contains the keychain package.
sudo yum install keychain
This will install keychain and its dependencies.
~/.bash_profile
file:eval $(keychain --eval --agents ssh id_rsa) source ~/.keychain/$HOSTNAME-sh
This will set up keychain to start automatically when you log in, and to use your ssh
key with ssh-agent
.
bash_profile
:source ~/.bash_profile
This will apply the changes to the bash_profile
file.
ssh-add
This will add your ssh key to the ssh-agent
.