What is SSH Key?
The Secure Shell (SSH) tool is used for connecting remote servers and SSH uses public-private key encryption. As an initial step, we need to create an SSH key pair. A graphical tool known as Seahorse(Passwords and Keys), is used for this purpose. Seahorse is a GUI (Graphical user interface) application generally termed as Passwords and Keys. It is used to manage SSH and PGP keys by possessing encryption and decryption in a much safer and secure manner. Also, Seahorse allows inexperienced Linux users to manage SSH keys easily since it has a user-friendly graphical interface. It is an interface that manages different key types and logins. Like the command line, its configuration will also be stored in the .ssh subdirectory.
Following are the important steps that we used for creating an SSH key pair :
Generating SSH Key
- We can generate a new key from the Seahorse interface by clicking the plus (+) and select “Secure Shell Key” and Continue.
- On the next screen, we can add a description of what this key is for, etc. and then select “Just Create Key”.
- Click “OK” during the key generation process. Now your new key has been generated on the interface.
- We can confirm this key pair by checking .ssh subdirectory in our home directory
root@me:~$ cd .ssh
root@me:~/.ssh$ ls -l
-rw——- 1 root root 1679 Apr 1 11:40 id_rsa
-rw-r–r– 1 root root 398 Apr 1 11:40 id_rsa.pub
-rw-r–r– 1 root root 222 Apr 1 10:54 known_hosts
5. We can see there are two files id_rsa and id_rsa.pub with SSH key pair, which represents Private and public ley respectively
Connecting SSH Key To A Remote Server
In order to use key-based authentication, we need to copy the public key to the remote host. This allows a passwordless login. For activating this in our interface by clicking “Remote” from the menu bar. Choose the tab “Configure Key for Secure Shell”. Now another screen will appear. Please enter the hostname and click Set Up. Then enter the login password. Now we can log into the remote host without any password.
Security is the main aspect of safe computing. If we are not adopting the security measures wisely, there is no matter how many of them occupied. In this scenario, Seahorse is a tool or application which may avoid such security threats to a large extent. Like we saw above encryption is the one aspect that features in this tool and it also ensures the keys are to be misused. For a beginner in Linux, Seahorse is one really helpful tool for the manipulation of encrypted/decrypted keys since it provides these facilities without accessing the command line.