Help with SSH tunnel

Associate
Joined
27 Sep 2005
Posts
103
I am having problems setting up a SSH tunnel from my works or any other PC not on my network to my home PC which is running openssh for windows as the SSH server and i am completley stumped. I want to use a SSH tunnel so i can surf the web at work Anonymously

I have installed OpenSSH for windows + cygwin and copied the cygwin1.dll file to the openssh folder and created the username + password files with the mkgroup + mkpasswd commands and edited the sshd_config file to use port 443 i successfully started the opensshd service by typing in net start opensshd but when i try to use putty i cant connect i get the error message Network error "connection refused"

my batch file looks like this

putty -D 8080 -P 443 -ssh 213.myaddress.do1.com :) obviously thats not my ip

things i have tried .....

Restarting the opensshd service

making sure the firewall was off on all machines stopped the service

Port 443 is 100% forwarded on my router i have even ran multple port checks and they all say port 443 is open

Added the PC running the SSH server into DMZ

Disabled all AV

Uninstalled IIS ? read somewhere it takes port 443 /80 ??

Any help would be greatly appreciated thanks
 
I hope this doesn't confuse your situation but it's almost like the packets are making it to the destination, which you would definately expect with the server in a DMZ with its firewall disabled :eek:, only to find there is no service listening for them.

From a little bit of messing around I can generate the following errors with PuTTY:

  • "Network error: Connection timed out"
    - packets are silently dropped en-route or at the remote firewall.
    - packets rejected and 'icmp-port-unreachable' returned.
  • "Network error: Permission denied"
    - outgoing packets from PuTTY are blocked by the local Windows firewall.
  • "Network error: Connection refused"
    - packets forwarded to a non-running service.
    - packets rejected and 'tcp reset' returned.
  • "Server unexpectedly closed network connection" (after some considerable delay)
    - packets are forwarded to the wrong service.
I'm assuming Windows doesn't have any concept of privileged ports and that you would have received an error if, for some other reason, OpenSSH was unable to bind to port 443 upon initialisation. I presume you've tried other ports as part of the troubleshooting process, unless your company's outgoing firewall rules are known to be very restrictive?
 
hi ncjok thanks for the your reply helps quite a bit

Im not sure but i think IIS has done something to the machine running the SSH server when i do a netstat its showing the IP 0.0.0.0.0 is using Port 443 i have also tried port 22 and get same error

I have tried non work machines on a totally different network to my home PC and get same error so i dodnt think its my company's Firewall rules
 
I started from scratch on a Windows XP Virtual machine and seemed to have got it working to a extent if i type 127.0.0.1 port 22 into putty on the PC that the SSH server is installed on it now asks me for a username and password which mean that the SSH server is listening and the port is opened ?

I have just tested it from a External PC /network and it works fine using my Wan IP / port 22 Woooohoooooo Finally !!!!!!!!!!!!!!!

but if i change the port number to 443 in the sshd_config file /open port 443 in router it doesnt work for some reason not even 127.0.0.1 from the pc that the SSH server is running on oh well guess i will have to use port 22
 
Last edited:
Doesn't seem logical to me that with IIS disabled you still couldn't get port 443 to work. Some references around on the web seem to suggest it is a trivial matter for most; I found a distinct lack of search results for people who couldn't get it working. How come you were intending to use port 443 anyway? I was assuming this was because port 22 had been previously tried without success.

Somewhat irrelevant now but I was wondering whether a simple 'netstat -a -b' would have indicated that port 443 was still being used by another process.

Glad it's working though. Is the Cygwin/OpenSSH for windows setup compatible with public key authentication or will you just stick with a regular password?
 
Back
Top Bottom