Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

GUI window: ssh://ubuntu@ec2-something..etc.compute-x.amazonaws.com.....???

Thanks in advance for any help!

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

3 Answers 3

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

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

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

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.

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

Your Answer

 
discard

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.