How would I go about changing either my SSH config or Cyberduck configuration to enable SFTP connections from my local machine to connect through a proxy server and then connect to my destination server? Right now, my connection fails/times out in Cyberduck. However, I can reach the server just fine via SFTP from a Terminal window and I figure that something might be wrong with my SSH config.

This is how my SSH config currently looks:

Host proxyserveraddress.test.com
ProxyCommand none
# PreferredAuthentications publickey

Host server1.test.com

Host server2.test.com

Host server3.test.com

######## DEFAULTS #########

Host *.test.com
User myusername
Port 8622
PreferredAuthentications publickey,password
ProxyCommand ssh proxyserveraddress.test.com exec nc %h %p 2>/dev/null

As a specific example based on this sample config -

How would I, for example, modify this config to have Cyberduck on my local machine connect first to proxyserveraddress.test.com and then to server1.test.com?

  • Did you try to connect to the different servers using plain ssh with the -v option to see what happens?
    – Marian
    Jan 26, 2015 at 1:52
  • I have no problems connecting to the server via SSH from the Terminal. It is when I try to make a SFTP connection from Cyberduck that the connection attempt fails and times out. Cyberduck doesn't provide any error details.
    Jan 26, 2015 at 15:27

2 Answers 2


It seems that cyberduck doesn't use SSH internally but implements the SSH protocol by itself.

From their wiki page on sftp:

The following configuration options from ~/.ssh/config are supported for SFTP connections:

  • IdentityFile for public key authentication.
  • HostName aliases.
  • User preference for login credentials.

I use a similar config, which works fine for me.

It might help to explicitly exclude the proxy server from the last Host block:

Host *.test.com !proxyserveradres.test.com
    ProxyCommand ...

Besides, you could try the -W option (this basically does the same as nc, but without the extra command, thus it's more efficient and there's one possible source for errors less)

ProxyCommand ssh proxyserveraddress.test.com -W %h:%p
  • 1
    I've tried your suggestions, but still no luck with Cyberduck. The connection still fails/times out.
    Jan 26, 2015 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.