Wednesday, June 18, 2014

Seahorse SSH key creation

I've already posted about the troublesome SSH host-based authentication.
Now I'd like to visit the more secure user-key authentication.
What's great about Seahorse is that it's simple.

If lots of keys are to be processed, shell scripts seem inevitable.
This is the case on special occasions, hence not very often.
When that's the case, get to know what's under the hood.

I assume the following prerequisites have been fulfilled:
   
Start Seahorse through the main GNOME Applications menu ( Alt + F1 ).
Go to Applications | Accessories | Passwords and Encryption Keys.
In the application main window choose File | New or Ctrl + N.
Choose Secure Shell Key and click the Continue button.


Fill in a meaningful Key Description and choose RSA 4096 bits.
The next image is just an example, of course.


Click the Create and Set Up button.
Next, enter a strong passphrase to protect the key.


Provide the target Computer Name, Login Name and Password accordingly:



If successful, the key will be listed on the main Seahorse window:


Verify if everything is working as expected.
Attempt to establish a SSH connection to the target host.

The following desktop modal dialog may appear for each SSH key listed in My Personal Keys until a key is found to successfully complete the authorization or no suitable key is found at all.


jsmith@desktop-1.business.corp:~$ ssh nfs-1.business.corp
Last login: Tue Jun 17 15:09:23 2014 from desktop-1...
Oracle Corporation   SunOS 5.11    11.1    April 2014

jsmith@nfs-1.business.corp:~$ _

That should be all.