Ubuntu / Debian Linux Install Keychain SSH Key Manager For OpenSSH

Ubuntu / Debian Linux Install Keychain SSH Key Manager For OpenSSH

Keychain is a utility that is used to manage SSH keys on Ubuntu and Debian Linux systems. It allows you to store your SSH keys in a secure keyring and automatically load them when you log in to the system or start a new terminal session.

To install Keychain on Ubuntu or Debian Linux, you can use the following steps:

  1. First, update the package list by running the following command:
re‮‬fer to:lautturi.com
sudo apt-get update
  1. Install the Keychain package by running the following command:
sudo apt-get install keychain
  1. If you want Keychain to load your SSH keys automatically when you log in to the system or start a new terminal session, you will need to add the keychain command to your .bashrc file.

To do this, open your .bashrc file in a text editor (e.g. nano):

nano ~/.bashrc

Add the following line to the end of the file:

eval $(keychain --eval --agents ssh id_rsa)

This will load the id_rsa SSH key when you log in or start a new terminal session. Replace id_rsa with the name of your SSH key if it is different.

  1. Save the .bashrc file and close the text editor.

That's it! Keychain should now be installed and configured on your system. To use Keychain, simply add your SSH keys to the keyring by running the keychain command and following the prompts. Your SSH keys will be stored in the keyring and automatically loaded when you log in or start a new terminal session.

Created Time:2017-10-30 14:27:28  Author:lautturi