The Putty Tunnel


 

Using putty and firefox to tunnel across to web pages.

Download foxy proxy and add it to your browser (also available for chrome)

In putty on your cm connection go to SSH / Tunnels and enter a source port i.e 9080 and then click on Dynamic and save it your CM session.

image

Now open Firefox and right click on the foxy proxy icon image at the top of the browser and click options.

Click add new proxy

In the Host or IP Address enter 127.0.0.1 in the Port enter your port number you entered in putty i.e 9080 and then click SOCKS proxy and ok

image

Now double click on your new entry

image

Give it a name i.e. Tunnel and change the colour so you can distinguish it, then click on the URL Patterns tab.

image

For each ip address pattern you want to connect to add a new URL pattern for example for 10.x.x.x addresses I enter 10.* for the name and *://10.*  then click ok. This will allow we to connect to anything in that range once I have a successful tunnel open to CM.

image

Now open putty and connect to your CM session and login. Leave the session open. In your Firefox brower right click on the foxy proxy icon and select your new tunnel proxy. Enter the address of the device you are trying to connect to and if it is working you should see the foxy proxy icon spin. image

SSH / SFTP fingerprint error


If you see this message when connecting via a secure method then follow the instructions below.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the DSA host key has just been changed.
The fingerprint for the DSA key sent by the remote host is
67:fd:5e:55:5b:39:36:f8:17:89:77:a0:a5:14:82:76.
Please contact your system administrator.
Add correct host key in /var/home/dadmin/.ssh/known_hosts to get rid of this me.
Offending key in /var/home/dadmin/.ssh/known_hosts:6
DSA host key for <ip-address> has changed and you have requested strict checkin.
Host key verification failed.

From the CM command prompt type;

rm /var/home/dadmin/.ssh/known_hosts

(This removes the whole known hosts file, you get the file path from the message above Offending key in /var/home/dadmin/.ssh/known_hosts:6This maybe different dependant on if the message is from SSH access or SFTP backups for example).

To remove a single entry which can be identified by the error message in this case line 6 “Offending key in /var/home/dadmin/.ssh/known_hosts:6“. Also note the path, again this will change dependant on if it is from SSH access or for SFTP backups.

Type the following;

cd /var/home/dadmin/.ssh/

(This gets you to the directory)

vi known_hosts

(This opens the known hosts in VI you get this from the end part of the error message Offending key in /var/home/dadmin/.ssh/known_hosts:6)

Type

6 G (which is go to line 6 as taken from above message “known_hosts:6)

dd (to delete the line)

ZZ (to quit and save)

All done you should now be able to connect.