I'm trying to connect to myself through ssh. (For testing purpose). I'm on a Ubuntu laptop. I successfully launched a ssh serveur, and ssh localhost works fine. If I try ssh , it works too. (I got it from ifconfig)But if I try with my public IP adress (got it on whatismyipadress.com), it doesn't work, I get a timeout after 2 minutes. (Note that ping  works fine)Any idea about why I get this ? I wouldn't be surprised if the problem came from my router (or is it a modem, or something like that ? I don't know), which would be working fine but have no idea about where to redirect ssh request (maybe on a computer from home which doesn't run ssh server ?)
Can't ssh to myself through internet?
ssh;openssh;timeout
As @Findus23 says, you have to forward a port (different from the 22, which is perhaps used as default port to connect to SSH router itself) from the router to your PC.  I make an example:  PC [192.168.1.10] <==> [192.168.1.1] Router [1.1.1.1] <==> Internet  As you can see, connecting through SSH to the address 1.1.1.1 results in connecting to the port 22 of your router on his public interface (faced to Internet).  If you want to access a PC located behind the router (so, in the private network of address space 192.168.1.0/24) you have to enable Port Forwarding.This is mandatory because your router must know which host it has to contact from the full address space of PCs connected to it. For example:  (PC1[192.168.1.2], PC2[192.168.1.3]) <==> Router  Router cannot know if it has to route to PC1 or PC2 when contacted to a specified port.Enabling Port Forwarding you can say:All connections from Internet to port X of the router, must be routed to port Y of PCZ  So, in your case:  Router:<port> => PC1:22 (route connection from router port 4000 to port 22 of PC1)ssh -p <port> user@<router-IP>  results in connecting, from Internet, to the specified local host.