unable to ssh from one Ubuntu Hardy machine to another

Asked by martinba on 2008-12-08

I have two machines running Ubuntu Hardy; one desktop and a laptop. The desktop connects to a router via cable; the laptop via wireless. I am unable to ssh from one to another; nor scp. The error messages I get mention port 22, refusing the connection. However, upon scanning for ports, port 22 does not seem to exist on either machine. On the desktop I changed the port 22 -- in /etc/ssh/ssh_config -- to a stable port, 139. The laptop does not seem to have any stable open ports. What to do?

Question information

English Edit question
Ubuntu openssh Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:


Then please try to check any firewall is active or modify firewall rules on both pc and on the router.

Hope this helps

Best Greg (rylar22) said : #2

1. Almost all networking problems are related to cables. So, step 1 is to always confirm that the lower layers of the network function in both directions: from client terminal type: ping <server> from server: ping <client>

I suspect that ping will fail. If ping succeeds in both directions then,

2. on the server machine's terminal type: netstat -an | grep ":22"

You should get a listing for something listening on port 22. This will confirm that sshd is indeed running on the server. If it is not make sure sshd is installed, and running. "sudo apt-get install openssh-server"

If the server is installed, running correctly, ping works, and yet you can't ssh to port 22, then your next most likely problem could be a firewall,

3. Disable the firewall on the server temporarily and check to see if that resolves the issue.

Let me know if those steps help, if not please post more information about what happens when you preform the steps and we will see what we can do. Based on your technical detail provided in your answer my response left out some of the details, if you need me to clarify please ask, and I'd be happy to.

martinba (gnocchiverdi) said : #3


The problem is solved! Installing ``openssh'' did the trick. scp also works, as you can guess. Thanks!