3

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 [email protected]

GUI window: ssh://[email protected].....???

Thanks in advance for any help!

2
  • Have you tried Alt+F2 instead? Jul 22, 2012 at 23:32
  • That would be sweet but nothing happens :|
    – gorn
    Jul 24, 2012 at 3:06

3 Answers 3

2

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)

1
  • 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, 2012 at 3:02
0

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:

Host ec2-something..etc.compute-x.amazonaws.com
    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.

2
  • Only the know_hosts file in that directory
    – gorn
    Jul 24, 2012 at 3:14
  • Create the $HOME/.ssh/config file. It's okay! :)
    – behnam
    Jul 28, 2012 at 15:36
0

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

1
  • 2
    Could you post the answer here instead of on your blog? Or at least the short version.
    – Nanne
    Nov 19, 2012 at 12:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .