Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Currently I have ssh set up using openSSH on cygwin. I port forwarded from my router to the computer, and added an exception for port 22 on my windows firewall. I have free AVG which I believe does not have a firewall associated with it.

When I login to ssh using VMWare running ubuntu, I can login to my server using my LAN IP, but I can't login using my external IP. I get "Connection Refused" on port 22.

Here's the odd part: I scanned my port 22 on canyouseeme.org and it showed that port 22 was visible. However, when i nmap my port 22 through my external IP, it showed that port 22 was not open.

I'm not very experienced with ssh so any help would be great! thank you!

some things I've tried:

netstat -a | grep ssh

returns nothing

-vvv verbose...

me@ubuntu:~/Desktop$ ssh -v -v -v me@mycomp
OpenSSH_5.3p1 Debian-3ubuntu4, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to myexternalIP port 22.
debug1: connect to address myexternalIP port 22: Connection refused
ssh: connect to host myexternalIP port 22: Connection refused

Telnet... telnet localhost 22 Trying ::1... Trying 127.0.0.1... telnet: Unable to connect to remote host: Connection refused

I can login with my internal IP... me@ubuntu:~/Desktop$ ssh me@myInternalIP me@myInternalIp's password:

me@myInternalIp /cygdrive/c/Program Files (x86)/ICW/var
$

The router I'm using is Verizon GT04-WG-B

share|improve this question
    
Can you give details on how you configured your router? Does your ISP block any ports? Can you connect from another computer in the LAN? –  Bart De Vos Apr 7 '11 at 21:53

1 Answer 1

up vote 1 down vote accepted

It sounds like your router does not support (or does not have enabled) "routeback" (that may be a vendor-specific term, sorry). Basically, your router does not support (or is not allowing) receiving your SSH connection and then forwarding that connection back out into your LAN to your Windows machine, being designed rather to forward LAN-to-WAN or WAN-to-LAN, not LAN-to-LAN.

Unfortunately, I cannot help you to enable this for your router (unless your router is a Linux machine running Shorewall), but you shouldn't really need to -- just use your LAN IP when you are inside your network. That canyouseeme.org says your port 22 is open from the outside is a good sign; next step is to try to SSH to your external IP from outside your network to make sure it is indeed working. I wouldn't fret at all that you can't SSH to the external IP from inside your LAN.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.