0

I'm trying to SSH into my machine, but I'm getting an Operation timed out error.

I printed my IP using wget http://ipinfo.io/ip -qO -

I verified SSH was running:

kendall@kendall-XPS-8500:~$ ssh localhost
kendall@localhost's password: 
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-36-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

New release '16.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

Your Hardware Enablement Stack (HWE) is supported until April 2019.
Last login: Sun Sep 18 14:30:17 2016 from localhost
kendall@kendall-XPS-8500:~$ 

I enabled port 22: sudo ufw allow 22/tcp

Then I rebooted.

Also this:

kendall@kendall-XPS-8500:~$ sudo netstat -plunt | grep ssh
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1135/sshd       
tcp6       0      0 :::22                   :::*                    LISTEN      1135/sshd 

I tried disabling and enabling firewall:

kendall@kendall-XPS-8500:~$ sudo ufw enable
Firewall is active and enabled on system startup
kendall@kendall-XPS-8500:~$ sudo ufw disable
Firewall stopped and disabled on system startup

But still no SSH -- Operation timed out

Is this something with my TWC modem? I am connected directly to the modem via ethernet (not to a linked router -- even though I tried that in bridge mode as well). Nothing seems to be working for me. Ideas?

  • "I am connected directly to the modem via ethernet" that is a REALLY bad idea, unless you're running a webserver and have all kinds of firewalls in place. – Android Dev Sep 18 '16 at 19:02
1

Well you can't get this working like this because , you need a router which will assign a private IP say (192.168.1.101). Now a days its all a same device (modem + router) in many cases and differs with situations. Meanwhile in the router you need to set port forwarding rule like Redirect all incoming connections in port 22 to 192.168.1.101. Then execute the command as follows :

ssh $(wget http://ipinfo.io/ip -qO -)

If you need to see the debug info while ssh execute as below.

ssh $(wget http://ipinfo.io/ip -qO -) -vvv

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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