blog menu1

Tunnelling in Putty


Tunnelling in Putty


1. Is VNC installed on the machine?

e.g to get onto linux box and check
To see if vnc is on a server do an
ls /usr/local/bin
Should see things like vncviewer, vncserver etc under there
e02% ls /usr/local/bin

Xvnc glib-config minigzip pico rsync vncconnect

capinfos gtk-config mtest pilot sudo vncpasswd
2. Set up Putty Session
Use an existing vnc putty session for your desired host or set a new one if this is the first

time you have tried to vnc onto this host
On the first screen i.e. the Session screen

Put in hostname i.e. e02

Put in name of session i.e. e02

Click on SSH (leave port as 22)
3. Got to SSH-Tunnels section on Left Hand side

Make sure the local button is checked

Type in 5901 into the Source Port box

Type the following into the destination box add machinename:5901 e.g. e02:5901

Hit Add
Then check the remote button

Put 5901 in the Source Port box

In the destination box type in localhost:5901 into the destination box

Should have something that looks like this when you are finished
L5901 e02:5901

R5901 localhost:5901
4. NB - This all assumes you are the first vnc session on the box - if you aren't

have to increment then numbers used i.e. if second session will have to put in localhost:5902
If you haven't got /usr/local/bin in your path you will get an error like

e02% /usr/local/bin/vncserver

vncserver: couldn't find "Xvnc" on your PATH.
Easily resolved
setenv PATH $PATH:/usr/local/bin
Then type

vncserver
Might prompt you for a password if not been done on this box before.

Can type in anything
e02% vncserver
You will require a password to access your desktops.
Password:

Verify:
e02% vncserver
New 'X' desktop is e02:1
Creating default startup script /opt/oracle/.vnc/xstartup

Starting applications specified in /opt/oracle/.vnc/xstartup

Log file is c/e02:1.log

Now start up vnc
On your PC go to C:\CATH\_Software\vnc

DOuble click on the .exe file (if you are trying to get to a BP machine remember to lauch with app tunnel)

Put in the server name box e.g. localhost:1 (or :2 if you are the second session on the box)
It will prompt you for a password - use the only you defined earlier
When you are finished, close down the vnc window

On the putty session kill the vnc session
vncserver -kill :1
e.g.
e02% vncserver -kill :1

Killing Xvnc process ID 24951
It might also be a good idea to remove your password file as vnc can be used as a Trojan Horse

cd /opt/oracle/.vnc

rm passwd

5. Linux box so just type vncserver to get session going

password is ..... for vnc session

After the bit you double click the vnc .exe just get gray box

Right click and chose terminal emulator and then xterm

To go to desired machine do a ssh -X machinename e.g. ssh -X reuabzlx001.abz.pce.abc.com

No comments:

Post a Comment