Basically, how do I do it?
I'd like to connect to my home computer from work, but my internet is routed through my apartment building's network, so I don't have the static IP address I'm accustomed to having.
How do I go about accessing my home computer through SSH (I'll be using Putty at work if it matters) if my home computer doesn't have a static IP address?
-
I think you may want to look into a service that can provide you with a dns domain name for your home computer. The following is one I have used with great success over the years: DynDNS.com
Basically, they use a service that runs on your computer that will update the dns record whenever the IP address of your home computer/router changes.
David Zaslavsky : @Steven: So your problem is not the absence of a static IP address, your problem is the absence of _any_ public IP address. I think the wording of your question is confusing some people.From Jordan S. Jones -
Within your LAN, set your router to forward the required ports to your local computer's IP/host. Then get the DynDNS service to acquire a hostname for your router. If the router's external IP is dynamic, use
ddclient
to auto-update when new addresses are assigned.From Delan Azabani -
You can try using something like STUN or some other NAT punch-through tool.
From sybreon -
You're unable to get to your computer because you're behind a NAT'ing system of some sort. In other words, your computer is on a private, internal network and being NAT'd via the building's NAT device, under their control so there is no easy way to get back in, in this sense.
One way would be to create a reverse SSH tunnel initiated from your workstation, outbound over the Internet, destined to an ssh daemon that you can connect to from home.
Once this is established, then you can ssh to localhost that you set up the reverse tunnel on (which would be redirected, via the reverse tunnel) to your system, from the ssh host that you connected to, via the reverse tunnel.
Hope this helps?
Afterwards, you may want to look into writing a small script for a cronjob to keep this connection alive, reconnect on disconnect, etc. and use ssh-agent properly, for passwordless connections - if set up properly, the passphrase would only need to be set once (if that).
From John -
you might find it easier to use a service such as hamachi or other zero-config vpn solutions. Join the two machines into the same vpn network, and ssh into its hamachi IP.
From Sirex
0 comments:
Post a Comment