6

I have Ubuntu 13.10 on my laptop which I would like to use to connect to my Ubuntu 12.04 desktop. I installed the open ssh server on the desktop machine using:

sudo apt-get install openssh-server

I checked that the server is running:

sudo service ssh start

and I get:

start: Job is already running: ssh

Next I checked if there is a firewall using:

sudo ufw status

and I get:

Status: inactive

Next I found out the desktop's IP address by executing:

ip addr | grep inet

and I get:

inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host 
inet 193.51.236.62/24 brd 193.51.236.255 scope global eth0
inet6 fe80::21a:a0ff:fe10:e8da/64 scope link 

So I suppose that 193.51.236.62 is my IP address.

Then on my laptop I verify that 193.51.236.62 is pingable and then I do:

ssh -v martin@193.51.236.62

and I get:

OpenSSH_6.2p2 Ubuntu-6ubuntu0.1, OpenSSL 1.0.1e 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 193.51.236.62 [193.51.236.62] port 22.

And nothing else seems to be happening. Please, how can I troubleshoot this problem? What am I doing wrong?

EDIT:

I can safely ping the server machine:

martin@martin-Studio-1537:~$ ping -c3 193.51.236.62
PING 193.51.236.62 (193.51.236.62) 56(84) bytes of data.
64 bytes from 193.51.236.62: icmp_seq=1 ttl=61 time=2.82 ms
64 bytes from 193.51.236.62: icmp_seq=2 ttl=61 time=4.05 ms
64 bytes from 193.51.236.62: icmp_seq=3 ttl=61 time=4.08 ms

--- 193.51.236.62 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 2.823/3.653/4.082/0.587 ms

EDIT2:

I tried to diagnose the connection using nmap as suggested:

martin@martin-Studio-1537:~$ nmap 193.51.236.62

Starting Nmap 6.40 ( http://nmap.org ) at 2014-01-31 18:39 CET
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 3.06 seconds

and then:

martin@martin-Studio-1537:~$ nmap -Pn 193.51.236.62

Starting Nmap 6.40 ( http://nmap.org ) at 2014-01-31 18:40 CET
Nmap scan report for 193-51-236-62.lille.inria.fr (193.51.236.62)
Host is up (0.0056s latency).
Not shown: 998 filtered ports
PORT     STATE SERVICE
3128/tcp open  squid-http
8080/tcp open  http-proxy

Nmap done: 1 IP address (1 host up) scanned in 8.18 seconds

1 Answers1

4

Start by checking to see that you can ssh into the desktop from the desktop.

ssh 127.0.0.1

If that works, I would check to see if the outside IP and internal IP are different.

saiarcot895
  • 10,757
  • 2
  • 36
  • 39
  • I tried it and I get: The authenticity of host '127.0.0.1' can't be established. ECDSA key fingerprint is ... Are you sure you want to continue connecting (yes/no)? – Martin Drozdik Jan 31 '14 at 17:18
  • There is a answer here on finding the IP address of a machine by the way. – Wilf Jan 31 '14 at 17:21
  • That's good. That means the SSH server is running. You can safely say yes, and it should connect. – saiarcot895 Jan 31 '14 at 17:22
  • @wilf I tried it. The external and local IP address are the same and they equal the address that I posted. – Martin Drozdik Jan 31 '14 at 17:25
  • Which you shouldn't post, as it is an external IP... – Wilf Jan 31 '14 at 17:26
  • If both computers are on different networks (different external IPs ), is it possible that there is some ISP/modem-level filtering that blocks port 22, but allows ICMP pings? – saiarcot895 Jan 31 '14 at 17:27
  • @saiarcot895 I am sorry, but I have no idea. I activated the firewall as @wilf suggested and when I hit ufw status I see that the port 22 is allowed. – Martin Drozdik Jan 31 '14 at 17:32
  • Aye, could be... proxys are are a possibility as well. With problems like this, I generally just nmap it: nmap 193.51.236.62 - that will show the open ports as well. – Wilf Jan 31 '14 at 17:35
  • @wilf I edited my question to post the results of nmap. How can I interpret them? What can cause 22 to be absent? – Martin Drozdik Jan 31 '14 at 17:44
  • If it was open, and running ssh, it would show as 22/tcp open ssh. If it has ssh, but is closed: 22/tcp closed ssh. As @saiarcot895 says, it could be the router/modem or the Internet Service Provider filtering the ports. A proxy or two may also prevent it working. – Wilf Jan 31 '14 at 18:10
  • I'm starting to also suspect a different firewall on the desktop computer that's only allowing 8080 and 3128. – saiarcot895 Jan 31 '14 at 18:14