Cyberduck Mountain Duck CLI

Opened 10 years ago

Last modified 3 weeks ago

#2865 assigned enhancement

Support proxy connection with SSH Tunnel through bastion server

Reported by: ross.peoples@… Owned by: dkocher
Priority: low Milestone: 7.0
Component: sftp Version: 4.4.5
Severity: normal Keywords: ssh tunnel sftp gateway jump server
Cc: xurizaemon@…, Gabrielradic, chris@…, denis@…, micah@…, pedrotti.maxime@… Architecture: Intel
Platform:

Description

Coming from Windows, I used WinSCP for my SFTP transfers. One of the features I miss in Cyberduck is the ability to connect to SFTP though another machine via SSH.

For example, I have a gateway that machine with an SSH server. When I connect to that server via SSH, I can then connect to another machine (inside the network) via SSH.

So having the ability to tunnel through one SSH server to another SSH server for SFTP transfers would be great. Right now, I have to log into the gateway, map a local port to the final machine, and use Cyberduck to connect to localhost:22 after the connection to the gateway has been made.

This would be a wonderful feature and a HUGE help to me and others in similar situations.

Attachments (2)

Without SSH_Tunnel.png (32.9 KB) - added by mmilci 4 years ago.
cyberducktunnelerror.png (96.7 KB) - added by micah-uber 2 years ago.

Download all attachments as: .zip

Change History (42)

comment:1 Changed 10 years ago by max@…

I just would like to second this feature request. We also have to access all our files through a gateway machine. It would be very helpful if one could do this via Cyberduck, without extra work.

comment:2 Changed 10 years ago by pablo.englebienne@…

I would like to third this request. I have the following setup in my ~/.ssh/config file:

Host gateway
  Hostname gateway.mydomain.com

Host server1
  HostName	server1.mydomain.com
  ProxyCommand	ssh gateway netcat %h %p 

This works perfectly for ssh and scp in the Terminal, but not with Cyberduck. Would there be a way for Cyberduck to use that information?

comment:3 Changed 9 years ago by shikishiji@…

this would be very useful for me too

comment:4 Changed 9 years ago by dan.xtc@…

Seconded this request as well, it'd be hugely useful.

comment:5 Changed 9 years ago by warrenmelnick@…

I have to also ask for this. This is a common corporate strategy and we are stuck dealing with it in strange ways.

comment:6 Changed 9 years ago by xurizaemon

  • Cc xurizaemon@… added

This would be a useful addition for those of us who host machines behind an SSH-enabled gateway host and prefer to avoid opening multiple ports for each machine behind that host.

SSHFS from MacFuse, SCP and regular SSH all support the ProxyCommand config directive.

Other tickets which touch on or duplicate this request are: #958, #2104, #3030.

comment:7 Changed 9 years ago by darkwater42@…

I would also love to see this feature. (I kind of just assumed Cyberduck would automatically support this, since everything else that I use that goes through ssh automatically does, and I banged my head on the wall for a while trying to figure out why it wasn't working.)

comment:8 Changed 8 years ago by https://www.google.com/accounts/o8/id?id=aitoawlb67hbvurczhystrpfukkx6qslhzokohi

I concur with all in this thread. This would help out allot for thous of us whom would like to use Cyberduck with ssh "jumpbox" (ProxyCommand). I use something similar to @pablo.englebienne in my ~/.ssh/config file:

Host proxy_jumpbox
  DynamicForward 8080
  HostName jumpbox.ssh-access-to-outside.myprotecteddomain.com 

Host *.NOssh-access-to-outside.myprotecteddomain.com
  EscapeChar none
  StrictHostKeyChecking no
  ProxyCommand /usr/bin/nc  -x localhost:8080 %h %p

When I want to connect into any machine under *.NOssh-access-to-realworld.myprotecteddomain.com domain I first open a connection to the outside accessible jump host: $ssh proxy_jumpbox. Then all the subsequent connections to the boxs w/o access to the internets *.NOssh-access-to-realworld.myprotecteddomain.com get tunneled via the DynamicForward+(ProxyCommand/nc) proxy_jumpbox.

Support for functionality like this would be awesome. +bump

comment:9 Changed 7 years ago by logicbus

Adding my name to the list of people who have requested this. I use SSH tunnel only on rare occasions, but when I need it, it's for a good reason.

Fugu http://rsug.itd.umich.edu/software/fugu/ can do this, but I like Cyberduck.

comment:10 Changed 6 years ago by Gabrielradic

  • Architecture set to Intel
  • Cc Gabrielradic added
  • Version changed from 3.1 to 4.2.1

Many hosting providers, especially for dedicated boxes, would provide a free space server to an (S)FTP. The catch is that the server would only work from inside that specific network. Some hosters providing this system are Hetzner, Dedibox and OVH, all huge.

Having a tunnel option for any (S)FTP connection would allow managing the backup space without much hassle.

comment:11 Changed 5 years ago by chris burgess

  • Cc chris@… added

comment:12 Changed 5 years ago by cobret

this would be very useful for me, too.

comment:13 Changed 5 years ago by dkocher

  • Priority changed from normal to low

comment:14 Changed 4 years ago by DSDeniso

  • Cc denis@… added
  • Keywords gateway jump server added
  • Milestone set to 5.0
  • Owner changed from dkocher to DSDeniso
  • Priority changed from low to high
  • Status changed from new to assigned
  • Version changed from 4.2.1 to 4.4.5

comment:15 Changed 4 years ago by dkocher

  • Milestone 5.0 deleted
  • Owner changed from DSDeniso to dkocher
  • Priority changed from high to low
  • Status changed from assigned to new

comment:16 follow-up: Changed 4 years ago by DSDeniso

dkocher:

Can I ask you why you changed this back? Do you have any plans on developing this, or? I thought it was ok, since this is quite old. I'm also open to come collaboration.

/DSDeniso

comment:17 in reply to: ↑ 16 ; follow-up: Changed 4 years ago by dkocher

Replying to DSDeniso:

dkocher:

Can I ask you why you changed this back? Do you have any plans on developing this, or? I thought it was ok, since this is quite old. I'm also open to come collaboration.

I would certainly welcome code contributions which would allow it to schedule for a milestone.

comment:18 in reply to: ↑ 17 Changed 4 years ago by DSDeniso

Replying to dkocher:

Replying to DSDeniso:

dkocher:

Can I ask you why you changed this back? Do you have any plans on developing this, or? I thought it was ok, since this is quite old. I'm also open to come collaboration.

I would certainly welcome code contributions which would allow it to schedule for a milestone.

I'm sorry. I don't think that I understand your message. Will you please try to explain in a bit more in depth? My formatting also looks wrong, so I'm maybe also missing some part of your comment.

Thanks, /DSDeniso

comment:19 Changed 4 years ago by kunda loves scribus

+1

comment:20 Changed 4 years ago by http://openid.lyraphase.com/

Surprised that this isn't already a part of Cyberduck, although I guess that this means it doesn't use built-in ssh & ~/.ssh/config.

comment:21 Changed 4 years ago by mmilci

Most companies uses jumpboxes and without SSH Tunnel support its not easy to use Cyberduck. I think, It's easy and very helpful change for new release

+one

Changed 4 years ago by mmilci

comment:22 Changed 3 years ago by popo

I agree; I'm surprised this feature doesn't exist, as it's a very common situation. For example, Amazon suggests setting up a bastion server for EC2 instances https://blogs.aws.amazon.com/security/post/Tx3N8GFK85UN1G6/Securely-connect-to-Linux-instances-running-in-a-private-Amazon-VPC, so if you want to transfer files to and from your instance, you have to first tunnel through the bastion server. Please add this functionality.

Last edited 3 years ago by popo (previous) (diff)

comment:23 Changed 3 years ago by a.e.urai@…

+1, it would be very useful to have SSH tunnel information in the settings for a specific bookmark and avoid having to manually reopen the tunnel when the connection drops.

comment:24 Changed 3 years ago by dkocher

#8688 closed as duplicate.

comment:25 Changed 3 years ago by dkocher

#9304 closed as duplicate.

comment:26 Changed 3 years ago by dkocher

  • Milestone set to 5.0
  • Status changed from new to assigned

comment:27 Changed 3 years ago by jcw.dev

I'd like to also nominate this feature - it is critical in enterprise environments that SSH bastion's or jumpbox's are reliably employed. There are two primary configuration components needed for this to work well: ProxyCommand, and ForwardAgent.

Consider this example where I first define my bastion host, and second define a host domain range for which I'd like to tunnel connections through the bastion.

Host bastion
Hostname        bastion.mydomain.com
User            jcw
IdentityFile    /Users/.../jcw.pem

Host *.mydomain.com
User            jcw
IdentityFile    /Users/.../jcw.pem
ProxyCommand    ssh -vvv bastion -W %h:%p -q
ForwardAgent    yes

The ProxyCommand is self-explanatory, and the crux of this topic. ForwardAgent is an important nuance, allowing the client to remain the only holder of their private key (it should not live on the bastion!).

If these things were in place, I would be using Mountain Duck as part of my core workflow every day!

comment:29 Changed 3 years ago by dkocher

  • Summary changed from SSH Tunnel to Support proxy connection with SSH Tunnel through bastion server

comment:30 Changed 3 years ago by dkocher

  • Milestone 5.0 deleted

comment:31 Changed 2 years ago by dkocher

#9708 closed as duplicate.

comment:32 Changed 2 years ago by micah-uber

  • Cc micah@… added

It would be great if this were a thing. Right now I have to use a different product to be able to accomplish this. As much as I love cyberduck, if i dont have this feature I cannot use this product. Its sad that this has been open for 8 years.... 2016... and cannot ssh tunnel... tsk tsk.

Please implement.

comment:33 Changed 2 years ago by mmilci

Hi micah, which product are you using support ssh tunnel, I cannot find any so I'm continue to use this, if you found can you share the name

Changed 2 years ago by micah-uber

comment:34 Changed 2 years ago by micah-uber

I may have misspoke a little. I have an ssh config that does the proxying for me. Other clients respect this config and work as expected. When I use cyberduck it will not let use the setting i have setup in the .ssh/config file.

Host domenode
  HostName somenode
  ForwardAgent yes

Host someprefix-* !somenode*
  Compression no
  ForwardAgent yes
  HostName %h
  ProxyCommand ssh somenode -W %h:%p

With this I get this error.

For context, I can ssh to somenode just fine.

I also think native support would be best since you dont have to rely on ssh configs.

Last edited 21 months ago by dkocher (previous) (diff)

comment:35 Changed 2 years ago by mmilci

yep, 8 years ago task was created with same request "even if you are not support tunnel, at least let cyberduck to use ~/.ssh/config" but it is not support

comment:36 Changed 2 years ago by micah-uber

Is there a timeline for supporting .ssh/config settings? or support it natively?

comment:37 Changed 2 years ago by mmilci

I’m also a user, but 8 years clearly shows it won’t happen.

comment:38 Changed 20 months ago by yourwebclient

I found myself desperately needing to access a VPN that was connected to on a remote host, from my localhost (Mac). Specifically, I wanted CyberDuck on my Mac to have access to hosts on a VPN that only a remote (but locally accessible) host had access to. But I found the ProxyCommand setting that works perfectly with BBEdit's SFTP infrastructure, doesn't work with Cyberduck.

WORKAROUND: I set up an ssh tunnel daemon using the Mac "SSH Tunnel" app (paid app) from the App Store, using the app as convenient way to track and manage tunnels (in my case, all one of them), but no magic there, it's just uses ssh -L ... (many examples of setting up that kind of tunnel, online). Once a tunnel is running that bridges the Mac to a host on VPN via the the VPN-connected remote host (lets call it the proxy), I connect with Cyberduck running on the mac to the tunnel port on same mac Cyberduck running on (e.g. to localhost:<tunnel port>), and whalla - CyberDuck now has access to a host on the VPN. The downside of this workaround might be an avoidable performance hit (e.g. redundant ssh encryption of the I/O streams).

It would be helpful if CyberDuck supported the ProxyCommand ssh config option, or at least would explain their position on the matter, in any case (I.e. Are there future plans to add this? Is it deferred? Is it technically not feasible? Skipped due to the availability of workarounds? Not enough demand? Not interested, etc...?)

Last edited 20 months ago by yourwebclient (previous) (diff)

comment:39 Changed 10 months ago by mpmuc

  • Cc pedrotti.maxime@… added

comment:40 Changed 3 weeks ago by dkocher

  • Milestone set to 7.0
Note: See TracTickets for help on using tickets.
swiss made software