1

Sample :

[[Server]] has two interfaces : iface1 and iface2 ;

  • iface1 only listens SSH
  • iface2 only listens HTTPS (my target)

Only [[SSHProxy]] is authorized to connect to [[Server]]:22

diagram :

:iface2(listen 443) [[Server]] :iface1(listen 22) <-----> [[SSHProxy]] :iface1(listen 22) <-----> [[MyStation]]

QUESTION ==> How to forward locally [[Server]]:iface2(443) on [[MyStation]] in 1 ti in ssh_config, with nc or "-w" option in SSH ??

Actually I do it in two times :

  1. From [[MyStation]] : ssh user@[[SSHProxy]]

    Then on SSHProxy : ssh user@[[Server]] -L8443:iface2:443

  2. From [[MyStation]] : ssh user@[[SSHProxy]] -L8443:127.0.0.1:8443

I'm looking for a faster way...

Thanks a lot !

1
  • 1
    Your question is frankly painful to read -- Please take a few minutes and rework it so the formatting is nicer and what you are asking is ore clearly stated. Full, complete, formal English sentences are encouraged. Take a look at some highly-voted questions and our Markdown editing help for some pointers.
    – voretaq7
    Jan 9, 2013 at 21:04

1 Answer 1

0

Config file could be something like

$ cat .ssh/config 
   Host Server
         HostName [[Server]]
         User [[Server_user]]
         LocalForward 8443 iface2:443
         ProxyCommand ssh -W %h:%p [[SSHProxy_user]]@[[SSHProxy]]
0

You must log in to answer this question.

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