# SSH only connected though port 22?

## pstar

Hi, I am trying to set up my home PCs so I can ssh from outside. But when I tried ssh to my University

serve and ssh back, it will get  "Connection refused" errors unless I set my sshd to use port 22 and forward 

port 22 in my modem to my home PCs. 

Even I set the port forwarding forward port other port like 1022(Public) to 22(private), it still wouldn't work?

Interesting thins is that if I test from port testing site, it will tell that my port 1022 is opened, only ssh wouldn't go thought, why? 

Other questions, may or maybe not related:

1. I use a Linksys WRT54G as hub, I think that is the correct term. I put modem ethernet, my PCs ethernet cables all into my ethernet port 1,2,3,4 

and leave the Internet port empty as I found its easier to manage, not need to set up IPs , port forwarding in modem and router. So I assume nothing

need to setup here?

2. Do I have to forward both UPD and TCP port for SSH and HTTP to working?

----------

## pstar

By the way, the command I am using something like:

```

ssh -p 1022 pstar@pstar.dyndns.org

```

----------

## d2_racing

Hi, you should read this great guide : http://www.buzzsurf.com/surfatwork/

----------

## Mad Merlin

 *pstar wrote:*   

> 1. I use a Linksys WRT54G as hub, I think that is the correct term. I put modem ethernet, my PCs ethernet cables all into my ethernet port 1,2,3,4 
> 
> and leave the Internet port empty as I found its easier to manage, not need to set up IPs , port forwarding in modem and router. So I assume nothing
> 
> need to setup here?

 

I'm surprised this works at all, unless your modem is functioning as your router instead of your WRT54G. In either case, the port forwarding on the WRT54G is only going to work if you actually have it doing the routing, which means you need to set your modem to bridged mode and then plug it into the WAN port on the WRT54G.

What IPs get assigned to the computers on your LAN?

----------

## pstar

Hi Mad Merlin, sorry I forget to mention the modem is a router/modem combo.And I use it to assign fixed IP from 100 upwards to PCs in LAN. As my understanding, the router/modem is doing all the routing and port forwarding stuff.

----------

## albright

Is there a firewall blocking ports besides 22?

----------

## pstar

I don't know, but didn't install any firewall by myself. And since a couple of port testing say my 1022 is open, so I think no?

----------

## pstar

Thank you guys, as I thought, nothing is wrong, just my University server don't allow anything beside port 80 and 22. I tried other ssh server and it was working.

----------

## d2_racing

Good  :Razz: 

----------

