Results 1 to 4 of 4

Thread: Can't SSH into my home Ubuntu from everywhere

  1. #1
    Join Date
    Oct 2013
    Beans
    3

    Can't SSH into my home Ubuntu from everywhere

    Hello,
    This is not directly related to programming, but I imagine people here might a better grasp on my problem. Thanks for reading.
    I have Ubuntu set up on my home computer. I am able to SSH into it from my university server, and from any computer on my home LAN. However, when I am at say, a friend's house, or a coffee shop, I cannot SSH directly into my computer. I first have to go through my University server. This is quite frustrating.
    Also, the problem is not specific to my Ubuntu machine. I also have a Mac at home, and when I try to SSH into it, I get the same results.

    I have tried asking a number of people about this without luck. Thanks in advance for any help.

  2. #2
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Can't SSH into my home Ubuntu from everywhere

    Are you using keys or passwords?
    I closed your previous thread:
    http://ubuntuforums.org/showthread.php?t=2185296
    From the Posting Guidelines:
    Do not cross post, or post the same thing in multiple locations.
    You can use the Report Post button to request staff to move the thread to a different forum.
    Last edited by Iowan; December 31st, 2013 at 08:25 PM.
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

  3. #3
    Join Date
    Aug 2011
    Location
    47°9′S 126°43W
    Beans
    2,172
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Can't SSH into my home Ubuntu from everywhere

    No related at all to programming...

    Normaly your computer is isolated from the Internet by a modem/router that uses NAT, and incoming connections (like SSH from an outside computer) are rejected. You have to configure the router so that incoming connections to a given port are forwarded to some designated local address and port (DNAT). You may have such a thing already set up, but currently restricted to a range of acceptable addresses (your university Internet gateway) which is a good idea. If you open this up, make sure you have some very good passwords, and an up-to-date software. There are possible additional protections like "port knocking".
    Warning: unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Can't SSH into my home Ubuntu from everywhere

    Networking can be complex.
    Different ISPs block different ports to "protect" end-users.
    Any source and target can have completely different allowed ports. There is no way to know without testing and a month later, one of the network providers may change their filters.

    So - first - what is the public IP for the target machine? Is it really public, non-bogon, and routable?
    Many places like cafes and hotels block what they consider strange ports - like ssh. To get around those and get through any proxy server they have, listen for ssh on port 443.

    Some places block server access to DHCP subnets - like DSL and cable residential networks too. If they do this by domain, then be prepared with the IP address.

    Also - don't forget that ~/.ssh/config is your friend for making ssh easier to use. Strange ports, different userids, friendly names for the remote server instead of some funky name auto-generated.

    Lastly - secure your ssh server. Do not allow passwords, only keys. Use fail2ban to block failed attempts. ssh is one of those few tools that are easier, more convenient AND very secure. I prefer to let the router do the port translation from 443 to 22 for me. Much easier that way and it is clear when I'm using the WAN interface or the LAN one - since 22 is only for internal use.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •