Start SSH session in linux (GUI) from KeePass by Auto-Type

Problem:

Under Linux, KeePass’s possibilities are not as rich as under windows, at least on GUI-side. While under windows it is easy to configure KeePass to start a “PuTTY” SSH session, under Linux it is not. So I found a way to solve my problem.

Solution:

Please follow instructions (gif) below:

GIF

 

  1. Select and open entry where you store credentials & information for your SSH.
  2.  Fill up with “User name” “Password” “URL”. In my case “URL” will be used as host to SSH (you can use host-name if it is in your /etc/hosts or if you have DNS-server like me). Of course you can use IP-address also.
  3. Go to “Auto-Type” tab & override default settings with the following:
^%t{DELAY 2000}ssh {USERNAME}@{URL} -p 222{ENTER}{DELAY 4000}{Password}{ENTER}

Explanation of code:

^ –> “Ctrl” key

% –> “Alt” key

t –> With “Ctrl” “Alt” “t” keystroke you open a terminal-window.

{DELAY 2000} –> We are waiting to make sure, terminal window opened. It is an experimental value, highly depends on your HW configuration (how fast) & actual load.

ssh {USERNAME}@{URL} -p 222{ENTER} –> Command what you type manual in terminal / console.”Username” and “URL” will be  substituted from enty.

{DELAY 4000}{Password}{ENTER} –> Waiting until connection establish, remote host ask for password. Then provide “Password” what you stored under entry’s “Password” & it will be substituted automatically.

The following method was tested on:

 – Ubuntu 16.04.01 LTS (Ubuntu MATE)

 – KeePass Version 2.32

 – libgnome2-common 2.32.1-5ubuntu1

One thought on “Start SSH session in linux (GUI) from KeePass by Auto-Type

Leave a Reply