How can I connect to Oracle Database 11g server through ssh tunnel chain (double tunnel, server in company network)?

后端 未结 4 582
执念已碎
执念已碎 2020-12-12 21:26

I have SSH access to \'public\' server, which is also the gateway to company network. There is another server in the network, where local Oracle Database se

4条回答
  •  囚心锁ツ
    2020-12-12 21:56

    Thanks!

    I called ssh -N -LXXXX:server:YYYY login@server twice.

    First, I called

    ssh -L 9998:127.0.0.1:9997 login@gate.company.cz
    

    on my PC.

    Then, on this server (during the SSH session), I called

    ssh -L 9997:localhost:1521 root@192.168.105.111
    

    where 192.168.105.111 is server where ORACLE was running.

    So what I did is following redirection:

    1521 (COMPANY ORACLE SERVER) 
      -> 9997 (COMPANY GATEWAY SERVER)
         -> 9998 (LOCAL PC)
    

    So I got ORACLE access in my local PC at port 9998 !

提交回复
热议问题