0

I'm having a problem with ssh in Ubuntu Desktop 14.04.

When I try ssh on local (192.168.1.23) I can access locally but when I try ssh on the external IP I'm getting "connection timed out".

When I try to ping my external IP, I'm getting response "unable to connect" through ssh even if I port forwarded port 22 and added rule in ufw firewall.

This was working in Ubuntu Server 14.04 but now I have a problem on Desktop version.

Can somebody help me to solve this?

Thanks in advance.

1
  • have you enabled port forwarding on your router to allow ssh traffic on that port to the computer on your LAN?
    – amc
    Jul 10, 2016 at 22:35

2 Answers 2

1

First of all, never post your real external IP address like that on the Internet. It is a very bad idea and adds no value to answering your question.

Since you mention that you can connect locally but not externally, that means that this is a networking issue. Your connection is working when it never leaves the network, but when you try to connect from the outside it is blocked. The question is where it's blocked, most likely it's on your server, but I'm not sure.

You can try disabling UFW completely (temporarily), if it doesn't help turn it back on. You can try switching to another port on the SSH daemon (such as 443 which is usually used for SSL) in case your ISP is blocking port 22.

To be honest though, your question doesn't really make a lot of sense and you need to troubleshoot more on your own; you say that it worked previously before switching to Ubuntu Desktop (on the server?) -- this would indicate that there cannot be a network issue (such as the SSH port being blocked) because it has worked in the past, and it is very likely to be a configuration error on the server. You mention that it works internally, so maybe the SSHD is configured to only accept local connections, or the firewall is misconfigured to only allow local SSH connections?

2
  • can you explain me more of this?Do i need to post output of firewall and netstat -tulpn? In sshd_config file its already set port 22 to accept connections and this worked on server version and now i need help to work on desktop also.If you can help me i would be greatfull. Thanks.
    – user283469
    Jun 1, 2014 at 12:15
  • @quuxman the issue is quite obviously not with the "ssh service"
    – pzkpfw
    Oct 15, 2014 at 5:51
0

Had the same problem. Solved as follows:

ssh -4 username@

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .