0

I don't actually understand how to do that. I have access to local computer for example 192.168.1.101 with some_user. From that computer i have access to another comp (via vpn) 10.0.132.17 and only from here i can reach access to computer 10.0.132.15 where i need to deploy my script.

so I need to:

$ ssh some_user@192.168.1.101 -> ssh another_user@10.0.132.17 -> ssh another_user@10.0.132.15

may i somehow do: ssh some_user@192.168.1.101 -p 2222 and get access to another_user@10.0.132.15?

or in python fabric to write somehow env variable?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Tapo4ek
  • 131
  • 1
  • 6

1 Answers1

0

Another option than using an explicit tunnel is to set up ssh to transparently forward through your proxies. Put in your ~/.ssh/config something like the following:

Host proxy_midstage
    User another_user
    HostName 10.0.132.17
    ProxyCommand ssh -q some_user@192.168.1.101 nc %h %p

Host proxy_final
    User another_user
    HostName 10.0.132.15
    ProxyCommand ssh -q proxy_midstage nc %h %p

Then the command ssh proxy_final will jump you straight to the deployment server. Presumably fabric can use that, though I'm not positive.

Danica
  • 28,423
  • 6
  • 90
  • 122