unable to ssh from one Ubuntu Hardy machine to another

Asked by martinba

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

Language:
English Edit question
Status:
Solved
For:
Ubuntu openssh Edit question
Assignee:
No assignee Edit question
Solved by:
Greg
Solved:
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

https://help.ubuntu.com/community/SSHHowto
http://www.howtogeek.com/howto/ubuntu/setup-openssh-server-on-ubuntu-linux/

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

Hope this helps

Revision history for this message
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.

Revision history for this message
martinba (gnocchiverdi) said :
#3

Greg,

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