1

I am looking for a ssh client that works like terraterm and has a menu where I can store the credentials of all the ssh server I want to access. Some of the server s I log in have 50++ chars passwords, that are impossible to know by heart.

I found a screen-shot of the Terra term Menu on the net:

img

That's what I am crying for.

Do you have a hint?

This is how Terra Term Menu looks like


I found sshmenu in apt but it crashes on start:

christian@christian:~$ sshmenu
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- sshmenu (LoadError)
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /usr/bin/sshmenu:3:in `<main>'
Radu Rădeanu
  • 169,590
Max Muster
  • 333
  • 1
  • 4
  • 14

2 Answers2

2

The bad news is that there doesn't exist a Linux version of Tera Term and SSHMenu doesn't work with (starting with Ubuntu 11.04 - Natty Narwhal).

The good news is that you can use your already installed gnome-terminal to accomplish what you wish. Yes, the default terminal in Ubuntu.

You have to create a profile for each server where you want to connect.

First you need to install sshpass - a tool for non-interactive ssh password authentication if you don't have it already installed:

sudo apt-get install sshpass

And now I will show you an example to illustrate how you must create a profile for one server where you will connect via ssh:

  1. Open a Terminal and click on FileNew Profile.
  2. Type in the Profile name for the Profile such as the server where you want to connect.
  3. After you click Create a new windou will pops up; go to the Title and Command tab.
  4. Tick on Update login record when command is launched.
  5. Tick on Run a custom command instead of my shell.
  6. In the Custom command box add something like:

    sshpass -p "password" ssh user@hostname
    
  7. Close.

edit gnome-terminal profile

From now you cat automatically connect to the desired server via ssh from gnome-terminal when you will open a new window or new tab from the File menu:

open a new tab with profile from gnome-terminal

Thanks to jjcv for this post from where I was inspired.

Radu Rădeanu
  • 169,590
  • 1
    Nice idea, +1. Better warning that he has now all his password stored in clear in .gconf/apps/gnome-terminal/profiles/; on the other hand, someone who forces you to use a 50+ length password and not accept private/public key authentication is asking for it... – Rmano Mar 28 '14 at 21:08
  • 1
    OK the setting "When command exits" should be : "keep Terminal open." THe rest is ok. – Max Muster Mar 29 '14 at 15:00
1

I would really advise a more secure, encrypted solution. Prepare a file, for example mysshcmds with this content:

sshpass -p "test1" ssh user@host1
sshpass -p "test2" ssh user@host2
sshpass -p "test3" ssh user@host3

(one command per line). Then encrypt it with gpg:

gpg -c mysshcmds 

You will be asked for a password (twice). Now it will create an encrypted file mysshcmds.gpg. Delete the plain file.

To use it you can issue the command:

gpg -d mysshcmds.gpg 2> /dev/null | grep host1 

which will print in clear the line:

sshpass -p "test1" ssh user@host1

which you can copy and past or even you can do

$(gpg -d mysshcmds.gpg 2> /dev/null | grep host1) 

which will issue the command straight away. Or you can easily write a script around it. This way you do not have any password stored in clear in your computer.

Note that the 2> /dev/null is here to make gpg silent ... you can avoid it if you want.

Rmano
  • 31,947