Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to access my PC from anywhere. I'm able to connect to the PC within the same LAN using the local IP. However, outside the local network I see a connection time out error.

How can I configure my OpenSSH server on Host and my router to allow SSH connections from anywhere over the internet?

share|improve this question
    
Are you using the laptop inside the same network? If not, your modem/router's firewall could be blocking it. –  papukaija Jul 7 '13 at 17:36
1  
Is your PC directly connected to the Internet? If not, did you enable port forwarding on your router? Can you connect within the same LAN, using the local IP? –  soulsource Jul 7 '13 at 17:37
    
right now I'm inside the same network. but that's why I used noip to access it from anywhere. –  omerjerk Jul 7 '13 at 17:38
    
I didn't try port forwarding . I'm able to connect to the PC within the LAN using local IP. –  omerjerk Jul 7 '13 at 17:46

1 Answer 1

up vote 2 down vote accepted

You need your remote Client, your home router, and your Host server to cooperate in creating an SSH connection on the same Port. Use port-forwarding within your router's configuration to forward the correct port (e.g., Port 22) to the local IP address of your Host server.

  • Port-forwarding settings should be present inside "NAT" or "Virtual Network" on the 192.168.1.1 page you use to configure your router :)
  • ifconfig on Host server will show its current local IP. Use nm-connection-editor to generate a Static IP address for this machine if it's not Static already.
  • Host server listens for SSH connection on Port listed in /etc/ssh/sshd_config
share|improve this answer
    
maybe you need to access you router setup some other way, but the part about configuring the forward is most likely spot on. –  mnagel Jul 7 '13 at 19:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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