Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using SSH in a GNOME terminal is fine. But I want to use it in a Unity window (the location text field, ctrl+l).

I need to refer to my .PEM x509 certificate for security reasons to connect to my Amazon aws EC2 server instance, by using the -i argument that I use in the terminal command.

In the terminal it looks like something like this: sudo ssh -i mykp.pem

GUI window: ssh://

Thanks in advance for any help!

share|improve this question
Have you tried Alt+F2 instead? – RobotHumans Jul 22 '12 at 23:32
That would be sweet but nothing happens :| – gorn Jul 24 '12 at 3:06
up vote 2 down vote accepted

There is no magic ssh:// pseudo-protocol as you suggest, which will open an SSH session. (although Nautilus does support ssh://user@host as a shortcut for SFTP). You can useAlt+F2 to get the graphical "Run" command box, but IIRC even that won't automatically bring up a terminal for ssh, etc.

Your best option might be to create a launcher (.desktop) with the full ssh command-line (as is), and set the "Terminal" property to "true". Call it "SSH-EC2" or something and you should then be able to start it directly from the HUD/Dash (gnome-terminal will automatically open and close when your SSH session ends)

share|improve this answer
I want to keep permissions to root on this file. Can I still launch it from the HUD without attempting to log in as root? (be prompted to enter password or somthing for root, as the ssh command has 'sudo' in it). Nothing happens now when I click it, can only launch it from the terminal with 'sudo ./aws.desktop', and everything is performed in the terminal. Cheers. – gorn Jul 24 '12 at 3:02

You can set a host-specific rule in you ssh-config file. Open (or create if doesn't exist) the file $HOME/.ssh/config and add the following lines to it:

    User ubuntu
    IdentityFile /path/to/mykp.pem

Now you should be able to use make a connection to the server using the ssh:// URL.

You may find more details about it on man ssh_config.

share|improve this answer
Only the know_hosts file in that directory – gorn Jul 24 '12 at 3:14
Create the $HOME/.ssh/config file. It's okay! :) – behnam Jul 28 '12 at 15:36

I just wrote quick post explaining ssh config file in bit more details.

share|improve this answer
Could you post the answer here instead of on your blog? Or at least the short version. – Nanne Nov 19 '12 at 12:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.