16

I am trying to follow the instructions here for OSX

http://wiki.filezilla-project.org/Howto

I can successfully ssh to the target server with no username/password (OSX picks up my certificates from the ~/.ssh directory), but I have no idea how to get Filezilla to do the same.

I have tried just running ssh-agent which doesn't do much.

10
  • By "FTP over SSH", did you mean SFTP, or real old FTP tunnelled over SSH? May 8, 2011 at 23:23
  • Did you follow the Windows part of the tutorial, or the single sentence relating to other platforms?
    – Daniel Beck
    May 9, 2011 at 4:59
  • @Daniel Beck, "other platforms"... @grawity, I mean SFTP, not FTP tunnelled over SSH. May 9, 2011 at 12:59
  • Do you get any output in the Terminal when you type printenv SSH_AUTH_SOCK? May 9, 2011 at 13:32
  • @William Jackson: /tmp/launch-xi2Fu5/Listeners May 9, 2011 at 22:01

7 Answers 7

22

You can now use FileZilla -> Preferences -> Connection -> SFTP which will allow you to import your private key.

4
  • 10
    Command-Shift-G and enter: ~/.ssh to go to your .ssh directory
    – Phani
    Jul 9, 2014 at 0:14
  • 3
    (translating from my language) "~/.ssh/id_rsa is not in a supported format. Additionally it's password protected. Filezilla doesn't support password protected keys yet. Do you want to convert the file to the supported unprotected format?" No, thanks... Aug 2, 2014 at 23:30
  • Is there a way to do this without importing your key? It worked fine for me without this until very recently in 2018. Jan 18, 2018 at 13:44
  • 1
    @SammyLarbi sorry, I don't remember this topic very well. However, the instructions were tried at the time and worked. Jan 22, 2018 at 20:12
7

Recent versions of OSX have the ssh-agent built-in and there is no need to start it separately.

In my case I simply had to change the logon type to "interactive" in the sites settings in FileZilla and choose SFTP as the protocol.

FileZilla apparently talks with the ssh-agent and handles the authentication. This is better than importing the key to FileZilla, since this way you can keep the file password protected.

3

You don't need .ppk or .pem keys.

  1. Add your private key to the SSH agent. In Mac, this is ssh-add ~/.ssh/[your private key] - if you haven't created SSH keys then run this command first ssh-keygen -t rsa -f ~/.ssh/[give a name for your keys] -C "[your email]"
  2. 1) Open FileZilla 2) Type host: sftp://[host ip address you want to connect to] 3) Type username: [your username] 4) Leave password and port fields empty 5) Click Quickconnect

FileZilla will be able to use the keys you've loaded in the SSH agent automatically.

2

Both instructions on this page tell 3/4 of the story:

Yar is correct: you only have to go to the SFTP settings page to enter your SSH key (which I had to format as a putty key with a .ppk extension - FileZilla will format a normal ssh private key for you if you let it).

ddd is correct that you have to put your login into "Normal" mode (but you still also need the key entered on the SFTP settings).

But there is one more thing you have to have in your settings - you must allow FileZilla to save passwords. This is in the Preferences -> Interface: If you check the box that says "Do Not Save Passwords" you will not be permitted to use Normal mode, and then your ssh won't be utilized - you will be prompted for a password.

So, do all three steps:

  1. Import SSH Key on the SFTP settings page.
  2. Do not check the box that says "Do Not Save Passwords" (i.e., allow saving passwords)
  3. Use Normal mode in the General tab of the server profile settings.

Good luck!

1

None of these solutions worked for me on MacOS (Sierra, High Sierra, or Mojave). Adding your own key to FileZilla Settings still prompts for a password after reboot.

Add the following to ~/.ssh/config:

Host *
ForwardAgent yes
UseKeychain yes  
AddKeysToAgent yes
IdentityFile ~/.ssh/id_rsa

Then do this in the terminal:

ssh-add -K ~/.ssh/id_rsa

Then create this file:

~/Library/LaunchAgents/local.computername.AddSSHKeysAtLogin.plist

Put this in it:

Label local.mycomputername.AddSSHKeysAtLogin ProgramArguments /usr/bin/ssh-add -A StandardOutPath /dev/null StandardErrorPath /dev/null RunAtLoad

Reboot and you should be able to use FileZilla without being prompted for a password. It Works!

I got the last part here: https://blog.elao.com/en/tech/ssh-agent-does-not-automatically-load-passphrases-on-the-osx-sierra-keychain/

0

For Mac Filezilla:

Top Menu: Filezilla -> Settings -> Connection/FTP/SFTP

Click Add keyfile to import the ppk file (there are a lot of pem to ppk converter if you only have pem private key)

-2

You have to put your server first in the server manager. Provide the IP/domain and username, and ensure the login type is set to "normal" then press login.

If you have a working SSH connection to this IP everything will be fine!

0

You must log in to answer this question.

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