Unable to connect to my Ubuntu machine using Putty remotely?

I am new to Ubuntu, I have it installed on my computer (not on a virtual machine) and I am trying to connect to my Ubuntu machine remotely through PuTTY. I am getting the IP address of the Ubuntu machine using ifconfig. I'm trying to connect to this IP address with PuTTY but I am getting the following error message:

Network Error: Connection Timed Out

As shown below:

Image showing "Network Error: Connection Timed Out" message from PuTTY

Can anyone help me?

1

1 Answer

Well, AFAIR correctly you need the openssh server for that which is NOT installed by default.

So try

aptitude install openssh-server

and try again.

So when the openssh-server is installed, try to see if it is running and to which port it listens to.

E.G.

[simmel]@[mars]$ service ssh status
ssh start/running, process 1279

so mine is running, let's see to which ip(s) it listens to.

[simmel]@[mars]$ sudo netstat -tlpn
Aktive Internetverbindungen (Nur Server)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1279/sshd 

So it's running and listening on all interfaces, which is the way it's setup by default.

Now try to connect to the server from localhost, does this work?

[simmel]@[mars]$ ssh -p22 simmel@localhost
Enter passphrase for key '/home/simmel/.ssh/id_rsa': 

It's working too. So the service itself is up an running and waiting for connections.

Now go to the system from where you would like to connect and install nmap and then scan the system, you should see the open ports after the scan.

sudo aptitude install nmap

and then (as root)

nmap -sS 10.128.225.177
Starting Nmap 6.40 ( ) at 2015-04-01 14:33 CEST
Nmap scan report for 10.128.225.177
Host is up (0.00075s latency).
Not shown: 995 closed ports
PORT STATE SERVICE
22/tcp open ssh
Nmap done: 1 IP address (1 host up) scanned in 8.45 seconds

Alternatevly you could try

telnet <ip-adress> 22

If both don't work your system def. blocks these request, possibly as suggested with a firewall. Most common is iptables. So give it a try and check on the system you installed the openssh-server

iptables -L

If it looks different like this

[simmel]@[mars]$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination 

an active iptables might be blocking these requests.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like