Passphraseless login using ssh-agent and ssh-add with SSH is a bit annoying, so it feels good to use keychain
.
sudo apt-get install keychain
Add the following settings to ~ / .bashrc and ~ / .zshrc.
/usr/bin/keychain $HOME/.ssh/id_rsa
source $HOME/.keychain/`hostname`-sh
You cannot register without a public key, so if you only have a private key, refer to How to generate a public key from an SSH private key and enter the public key. Generate.
Replace key names such as ʻid_rsa` as appropriate.
source .zshrc
Recommended Posts