Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got public key authentication working between my Mac OS X and an Amazon EC2 instance so that from the command-line I can just type the following and it works:

ssh root@[IPAddressOfEC2Instance]

The strange thing is that I can't seem to mount the instance using "Connect to Server" in the Finder.

I've tried typing the following server addresses into the "Connect to Server" dialog:

ftps://[IPAddressOfEC2Instance]
ftps://root@[IPAddressOfEC2Instance]

But all I get is

You entered an invalid username or password. Please try again.

The root user on the EC2 instance has a blank password and I'm wondering if it has to do with that. However, I can't change the password for the root user.

I can use an SFTP client to connect to the machine, I just can't mount it with "Connect to server". It asks for a username and password (for a registered user) and it's root/[blank] which it doesn't accept. The other option is "Guest" which brings up an empty folder in the Finder.

share|improve this question
    
Did you try with ftps://root@[IPAddressOfEC2Instance] ? –  Studer Feb 24 '10 at 22:42
    
I did try ftps://root@[IPAddressOfEC2Instance] –  user26767 Feb 25 '10 at 1:04
    
have you enabled SFTP in your sshd_config? –  John Douthat Feb 25 '10 at 2:54
    
I can use an sftp client to connect to the machine so I assume it's enabled. –  user26767 Feb 26 '10 at 15:38

2 Answers 2

SFTP is not the same as FTPS. FTPS is FTP using SSL. SFTP is secure file transfer protocol (over SSH). (Mac OS X's FTP/FTPS support in Finder is pretty pathetic anyways.)

Mac OS X can not natively mount SFTP shares. There is a way to do it using MacFUSE. It's rather difficult to set up and there's not a reliable non-commercial GUI application to manage it. There are a couple packages you have to install and a lot of command line hackery to get shares to mount (don't get me started on auto mounting them). It's really not worth the effort. I have done it a couple times before, but it was hell; I have found a much better solution: ExpanDrive.

It's a commercial program but it's worth every penny. It uses MacFUSE and allows you to mount SFTP, FTP/FTPS, and Amazon S3 "drives". You can download a free trial which works for 30 days. (Also, it won't expire unless you close it. :))

In order to get it to work using public key pairs you'll need to add your SSH private key to your Mac OS X keychain:

ssh-add -K

Then when you create a new drive in ExpanDrive leave the password field blank, but check the "Save" box.

You should be good to go. The great thing about ExpanDrive is it will auto reconnect the drives if the connection gets dropped (wifi drops, you sleep/wake your mac, you reboot).

share|improve this answer
    
The cumbersome ssh-add -K and "check the save box" trick might be unnecessary. The ExpanDrive dev's are saying simply leaving the password box blank will work. (Even password protected private keys should work.) –  Eric Boehs Feb 27 '10 at 18:30
    
I just verified this and was able to connect to my SliceHost account using PKI. No password, no save box check. –  Eric Boehs Feb 27 '10 at 18:31
    
I'm not tied to any particular protocol (ftps, sftp, etc). That being the case, is there a native way to mount an Amazon EC2 instance? If not, does your solution work for EC2? –  user26767 Feb 28 '10 at 3:43

You may need to enter the username and / or password in the "Connect to Server" box in finder.

ftps://root@[IPAddressOfEC2Instance]

You can alternatively use a standalone FTP application like FileZilla or Transmit.

share|improve this answer
    
Tried that as well... I think perhaps it has to do with the PermitEmptyPasswords ssh_config setting or similar. –  user26767 Feb 25 '10 at 0:50
    
Can you try adding a password to the root account? –  Josh K Feb 25 '10 at 1:23
    
Unfortunately no, I can't add a password to the root account. I'm afraid to even try in case it doesn't let me remove it. –  user26767 Feb 25 '10 at 1:34
    
Have you tried using a standalone application? –  Josh K Feb 25 '10 at 18:13
    
Yes, for example, I can use an sftp client to connect to the machine, I just can't mount it with "Connect to server". It asks for a username and password (for a registered user) and it's root/[blank] which it doesn't accept. The other option is "Guest" which brings up an empty folder in the finder. –  user26767 Feb 26 '10 at 15:37

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.