I recently started to build a LAN using D-Link switch and I got some issues with it.

My network scheme:

-- is the Ethernet cables

| Internet access via modem| -- |                 |

| PC w/ Ubuntu and Windows | -- | [D-Link switch] |

| PC w/ UbuntuServer 12.04 | -- |                 |

As you can see all PCs and Modem are connected to 5-port switch via Ethernet cables.

When I try to access the PC with Ubuntu Server installed, I got an error:

Connection to port 22 refused by server.

Please, help me to solve this.

I'm not lazy, so I googled this problem for 2 consecutive days.


1) I can ping this server from PC with Windows OS and Ubuntu: ( ping )

2) I checked open ports on the server using nmap. Result shows that only 139 and 445 ports are open.

3) Firewall is inactive

4) I ran commands to open 22th port on the server, so I consider they supposed to be open.

5) OpenSSH server installed and running

6) Login credentials are correct

7) I'm able to connect via SSH to localhost on the server, ( ssh localhost )


Can you telnet to port 22 from your Windows computer? If not, then it isn't open.

To telnet from Windows, you may need to install the "telnet client" (part of the Windows setup).

Also make sure your Windows firewall is not blocking outgoing access to port 22.

On your Unix box, do a "netstat -tn" and look for IP-address:22 in the list (where IP-address is your network IP or *, not

Also do you have a firewall (like iptables) installed on the Unix box? If so, check to make sure you are not blocking and allowing inbound port 22 traffic from the LAN.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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