0

I have been playing with the ProxyCommand in my config files on any devices I take away from home so that I don't have to open ports through my new DD-WRT NAT to connect to machines behind the firewall/router. (I set up ssh on the DD-WRT then remote-forward off of a connection to that box to get to anything behind it)

I figured out how I could do it from the command line using an alias host entry from my user config file but I'm wondering if there is any way to mount a drive from an fstab entry that would either point to a specific config file to get ssh options or allow me to specify things like a RemoteForward in the options?

SW

EDIT: I have a NAT router running DD-WRT with an open port to ssh I have computer behind the NAT router also running ssh. I currently have ports open to the ssh redirecting traffic to each - I want to do away with having so many ssh ports open (if any) since they aren't necessary with ProxyCommand. One of the computers behind DD-WRT (that I can successfully connect to using two profile entries: one for the router's ssh and one for the local-net ssh to the specific computer with a ProxyCommand through the router) and ProxyCommand

You can do similar type proxycommand hops with a command line (I figured rather than detailing the how's, that information is widely documented with a google search.)

Rather than keeping a port open to the fileserver, I want to use the ProxyCommand to connect to it when not at home rather than setting up an entire VPN configuration. I can run sshfs from the command line to connect it because the command line can access my user account's config ssh to get the profiles for the router and the machine running as the fileserver, use it's profile's proxycommand to hop through the router's profile and connect.

I was just curious if a reference to a particular config file was possible from the fstab syntax for sshfs (among other things, I use a specific rsa key pair for connecting to the router from outside)

  • please, clarify your setup, existing configuration and commands you are using so far. It is certainly possible to use it for sshfs with multiple hops, but I am not clever from the things you wrote so far. – Jakuje Apr 29 '17 at 19:12
  • I didn't think it would be necessary. Anyone familiar with ssh and proxycommand should understand what I was asking, but I edited for the long version anyway. – Scott May 1 '17 at 14:53

Your Answer

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

Browse other questions tagged or ask your own question.