mapletree

an Oracle player in Ottawa
正文

port forwarding

(2007-08-11 19:09:02) 下一个
  the original request is:
  mypc is my desktop(windows xp), titan(RHEL AS4) is the client gateway, eplse1(RHEL AS4) is the client server,
  there's an EM(10g dbconsole) running on eplse1, now we need to access EM on mypc.
 
  1> using port forwarding enable SQL*Net connection
       gateway:       tools(216.246.110.4)
       target server: delphi(10.0.4.2) 
       mypc : windows XP      
      
       putty -ssh -L  90001:10.0.4.2:1521
maple@216.246.110.4    --connection succeed
       --add a tns entry
       maple.tree =
   (DESCRIPTION =
     (ADDRESS_LIST =
       (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 37005))
     )
     (CONNECT_DATA =
       (SERVER = DEDICATED)
       (SERVICE_NAME = MAPLE.TREE)
     )
   )
       --tnsping maple.tree
       TNS-12545: target host does not exist, connection failed
      
       --try "ssh -L  90001:10.0.4.2:1521
maple@216.246.110.4"  on a linux server, error returned:
       Bad forwarding port(s) '90001:10.0.4.2:1521'
      
       --change a local port
       putty -ssh -L  37005:10.0.4.2:1521
maple@216.246.110.4
       --now localhost:37005 = delphi:1521
       sqlplus
user/password@maple.tree
      
       --debug the conenction, the ssh function provided by putty is limited, putty -ssh -v returns no debug info
       ssh -v -L  37005:10.0.4.2:1521
maple@216.246.110.4
 
  2> using port forwading to enable X11
      --login to a server (rod) has vnc-server installed
      vncpasswd
      vncserver:51
      make a VNC connection to rod:51
      twm &    #TWM: Tom's Window Manager, is the standard window manager for X window System,
http://xwinman.org/vtwm.php
      ssh -X oinstall@client_server
      ./runInstaller
     
  3> using port forwarding to enable web application
     # double port forwarding,
     # 10.0.12.26:1158 -->titan.foxsports.com:5013 -->localhost:1158
     # note, plink is at the same directory with putty, but when I use putty instead of plink, it does not work
     start /min plink -ssh -L 1158:127.0.0.1:5013
maple@titan ssh -L 5013:10.0.12.26:1158 10.0.12.26
    
     plink reports: Pseudo-terminal will not be allocated because stdin is not a terminal.
     actually it works,
http://l27.0.0.1:1158/em  will show the login page
    
     --to eliminate the error
     start /min plink -ssh -t -L 1158:127.0.0.1:5013
maple@titan.foxsports.com ssh -L 5013:10.0.12.26:1158 10.0.12.26
     -t      Force pseudo-tty allocation.  This can be used to execute arbitrary screen-based programs on a remote machine, which can be very useful,
             e.g., when implementing menu services.  Multiple -t options force tty allocation, even if ssh has no local tty.
     -T      Disable pseudo-tty allocation.
    
[ 打印 ]
阅读 ()评论 (0)
评论
目前还没有任何评论
登录后才可评论.