Before I connected to my server via Nautilus (sftp).
Now I moved to Amazon EC2, and there's just one way connect to server (ubuntu 10.10 too), using ssh -i mycert.pem
, no password, just certificate.
How can I connect to the server using Nautilus, just like i did before?
In other way I guess I can disable certificate by making some changes in /etc/ssh/ssh_config,but not sure what to do.
UPD: Finally i found solution by using sshfs, more explanation here How to mount Amazon ec2 drive locally - fuse + sshfs?
and googling by keywords sshfs + amazon ec2
UPD2:
ssh-add /path/to/my_cert.pem
and after this connection to sftp via nautilus also working fine
To connect to an SFTP server with the command-line on Ubuntu, start by launching a terminal window. Then, with the terminal window open, use the sftp command to connect to your SSH server.
In the Nautilus file browser and click + other locations at the bottom of the file browser. The connect to server dialog will open and enter the following connection string into the dialog and click the connect button: sftp://<username>@sftp.csc.uvic.ca/public_html You will be promtpted for your account password.
Command-line SFTP with SSH-Keys If you have configured an SSH-KEY, you can specify to use your private key to connect by using the ssh/sftp identity -i parameter in the command line: $ sftp -i /.ssh/my_key_file user@remote-host SFTP using Linux GUI File Browser (Nautilus)
Then, with the terminal window open, use the sftp command to connect to your SSH server. To connect, specify the username on the remote machine, as well as its IP address. For example, if the remote Ubuntu server or Ubuntu PC hosting an SSH server has an IP address of “192.168.1.203,” use that as the hostname.
I don't quite know what you mean by "I guess I can disable certificate" when you just said "and there's just one way connect [...] just certificate"?
I guess you'd like to have something more like this in .ssh/config. Append a section like the following 5 lines to any existing ~/.ssh/config (i.e. /home/sehe/.ssh/config)
Host myec2host
HostName 151.47.12.88
User ubuntu
IdentityFile ~/.ssh/mycert.pem
Compression yes
Note
myec2host
by the alias that you want to access the ec2 instance by~/.ssh/mycert.pem
by the full path to your private key (usually the keypair) you registered the instance with; I copied the name mycert.pem
from your own question, so it is probably that file
ubuntu
; root
won't work
Of course man ssh_config
will do miracles for the details. Also, http://alestic.com/ is an excellent resource on Ubuntu+EC2 (just make sure you don't confuse the Alestic and Canonical images). Lastly there is the google group for ec2ubuntu which has been very helpful to starters.
This way you can just point Nautilus at the server 'my3c2host' and get the reset for free. If the key is protected with a passphrase, you can use a passphrase agent (seahorse, gpg-agent... dunno by heart)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With