Saturday, February 23, 2013

SSHFS - Mount remote directory through gateway machine


  1. Expose target target server ssh port with ssh local port forwarding
    $ ssh -C -N -L localhost:local_port:target:target_ssh_port gateway_user@gateway
  2. Mount with sshfs through the port just exposed
    $ sshfs target_user@localhost:/target_directory /mount_point -o port=local_port
Example:
$ ssh -C -N -L localhost:22222:tap-machine:22 tapvpn@company-vpn-host.org
$ sshfs tap@localhost:~/work /mnt/work -o port=22222



No comments:

Clojure has lesser typing error problems than the others well-known dynamic typing languages

Give these snippets a try. // JS function foo () {   bar(1) } # Ruby def foo   bar(1) end ; Clojure (defn foo []    (bar 1)) As yo...