Security

How to set up SSH keys in Seahorse

Secure shell can be made even more secure with the help of key authentication. Here's how to set this up with the help of the Seahorse GUI.

linuxsecurityhero.jpg
Image: Jack Wallen

Security is at a premium. Anything and everything you can do to prevent server and network breaches should be moved to the top of your list. If you're a Linux admin, chances are you're going to want to set up ssh keys, for even more secure remote Linux administration. If that's you, and you'd prefer managing SSH keys within a GUI, you're in luck. With the Seahorse key and password manager, you can not only create your ssh keys, but easily copy them to your servers, so you can make use of ssh key authentication.

If you've never worked with Seahorse, it is the default key/password manager on many Linux distributions. You'll find it on any GNOME desktop, as well as others (such as Elementary OS). Let's take a look at how we can generate an ssh key and then, using the Seahorse GUI, copy that key to a server for ssh login.

SEE: Securing Linux policy (Tech Pro Research)

Generating an ssh key

Open up Seahorse from your desktop menu. Once it's open, click on the OpenSSH keys section of the main window (Figure A).

Figure A

Figure A

The Seahorse main menu.


Click the + button and, select Secure Shell Key from the list, and click Continue. In the resulting popup (Figure B), give the key a description and then click Create and Set Up. We are clicking Create and Set Up, as this allows us to automatically copy our new key to the necessary server.

Figure B

Figure B

Creating a new SSH key.


The steps for configuring options you will need to enter, for the new SSH key, are as follows:

  1. Enter a passphrase for the key
  2. Verify the passphrase
  3. Enter the address and username for the remote server the key will be copied to the remote address (Figure C)
  4. Enter the password for the remote user

Figure C

Figure C

Using Seahorse to copy the key to our server.


That's it. Your SSH key has been created and copied to the remote server. You can now use the ssh command with key authentication to that remote server.

SEE: Essential reading for IT leaders: 10 books on cybersecurity (free PDF) (TechRepublic)

Previously created keys

What if you open up Seahorse to find a previously configured SSH key available? Not a problem; you can copy that key to your server by right-clicking the key and selecting Configure Key for Secure Shell. The same dialogue window will appear that you used in Step 3 above. Enter the address and username of the remote machine, click Set Up, and (when prompted) enter the remote user's password. The key will be copied and you can then log into that server with SSH key authentication. You can also use this method to copy the same SSH key to as many servers as you need (it's not limited to a single server).

Easier SSH Key management

Although I believe ever Linux administration should be comfortable using the command line, with Seahorse, you will find SSH key management so much easier. Copy your SSH key to any server you need, create new keys, delete keys. With Seahorse, you no longer have to depend upon the terminal for SSH key managing. If the GUI is available, why not make use of it?

Also see

About Jack Wallen

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website jackwallen.com.

Editor's Picks

Free Newsletters, In your Inbox