How can I connect&mount to a remote server using SFTP when the servers SSH is configured to use a private key for authentication?
How can I connect&mount to a remote server using SFTP when the servers SSH is configured to use a private key for authentication?
You can use Nautilus. Just do Places > Connect to server and select SSH from the drop down. If you already have your key setup on the server there's nothing more to do. It will automatically use the appropriate key.
Blog | Ubuntu User #15350 | Zsh FTW | Ubuntu Security | Nothing to hide?
AMD Phenom II X6 1075T @ 3GHz, Nvidia GTX 650, 8GB DDR3 RAM, 1 X 1TB, 2 X 3TB HDD
Please don't request support via PM
Slicehost has a great article here. It's pretty straight forward:
http://articles.slicehost.com/2008/1...d-setup-page-1
Ok, good to know that "Connect to Server" can handle this - that is what i was hoping.
I suppose then my next question is how do I set up the key. I was provided the private key. Where do I put it and what do I do with it so that nautilus will be able to find/use it.
Blog | Ubuntu User #15350 | Zsh FTW | Ubuntu Security | Nothing to hide?
AMD Phenom II X6 1075T @ 3GHz, Nvidia GTX 650, 8GB DDR3 RAM, 1 X 1TB, 2 X 3TB HDD
Please don't request support via PM
I expect Nautilus will probably use ssh-agent to manage keys so it will probably expect your private key to be in on of these:
~/.ssh/id_rsa
~/.ssh/id_dsa
~/.ssh/identity
You should put the key in the appropriate file.
From ssh manualThe default is ~/.ssh/identity for protocol version 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa for protocol version 2.
I'd advise you check your key actually works first by manually loading it then seeing if you ssh into the remote host.
You can do that using the command line.
You can also try loading your key into ssh-agent. In ubuntu it seems ssh-agent is always running so you don't need to load it first, it will ask for your password if it's not a passwordless key.Code:ssh -i /path/to/your/private_key -v username@remotehost.com
If you can log-in then your key works. If it doesn't then the verbose output of ssh will tell you why.Code:ssh-add /path/to/your/private_key
Personally I wouldn't use Nautilus to log-in at all. I would use sshfs to mount a directory on your remote host instead and then happily browse it with nautilus.
Last edited by delcypher; November 13th, 2009 at 08:02 PM.
Ok, I must not be explaining things properly, but It still is not working, thanks for being patient with me.
The server I am trying to connect to is an amazon ec2 server running ubuntu.
Amazon's instructions for connecting via ssh are:
I paste this code into the terminal and it does connect.Code:ssh -i {filename goes here}.pem root@{address goes here}.com
So based on the instructions I just received from you guys, I:
- copied the {filename goes here}.pem file to the .ssh directory.
- Clicked "Connect To Server"
- selected ssh as type
- entered {address goes here}.com into the server field
- entered root into the username field
- clicked connect
I then get a popup that says Permission denied
Last edited by acroporas; November 13th, 2009 at 08:08 PM.
Blog | Ubuntu User #15350 | Zsh FTW | Ubuntu Security | Nothing to hide?
AMD Phenom II X6 1075T @ 3GHz, Nvidia GTX 650, 8GB DDR3 RAM, 1 X 1TB, 2 X 3TB HDD
Please don't request support via PM
Bookmarks