OK!!! I've successfully connected from an external network on both ssh and http. I changed a BUNCH of settings though before I got it to work, so I'm going to slowly change some of them back to see where the problem(s) really was(were).
Thanks for all the suggestions!!!
This ought to be a pretty simple answer, but I can't find it anywhere, and it's really confusing me. I am new to Ubuntu, and am trying to configure a web server. I have gone through tons of tutorials, and run into "host" or "localhost" very often. For example, to execute ssh user@localhost, I would replace user with my username, and localhost with my internal IP address (connecting from the same local network). That much, I can do.
I just want to make sure that all I have to do is replace host with my external (ISP provided) IP address to ssh from an outside network??? The thing is that I have done that, and it hasn't worked, so I want to make sure that my syntax isn't the problem. Thanks so much for your patience and support.
Ok. Everyone's saying I need to forward ports. I did forward ports 80 and 22 through my router to my server, but it's not working. I also contacted my ISP, and they said that they didn't know of any ISP restrictions on ports. So, yes. I think I set it up, but it's still not working. Also, I completely bypassed my router, and connected my server directly to the modem, which does NOT have an internal router, and the problem was still there. Since somebody upvoted this question, I can now post my pic :)
You need to forward a port used by SSH (22) on your router so all traffic coming on that port from outside is redirected to your Ubuntu machine.
See this article: http://www.howtogeek.com/66214/how-to-forward-ports-on-your-router/ or search for "forward port router".
Once you have port forwarding correctly configured, you'll be able to use your external IP address, or any DNS name configured to point to that IP address, to connect to your Ubuntu box from outside. The IP is the most robust way to do this. So, in your case, you need to replace (host) in (user)@(host) with your external IP address.
Also, as I said, getting proxy errors suggests that there's a proxy in the middle, which shouldn't be there. Which suggests that something is mis-configured.
Ok. To answer my original, official question, refers to the external IP address (ISP provided), and refers to the internal IP address. There is no extra punctuation necessary, and you do not need to include the internal IP address when entering , as that should be setup through port forwarding.
Now, the solution to my problem was not really a solution, but several solutions. It turns out that my configuration of my ROUTER was correct, and as determined in a previous question, we knew that my SERVER firewall was configured properly because I was able to access my home page and my server through ssh while on the LOCAL network. The big problem was with my MODEM; I had already set up a sort of port forwarding in my modem, but it was not configured properly to route to my router. Also, I had to make my modem's firewall accept WAN to LAN communication. In addition to updating these settings, which still needed to be done, I am sorry to admit that I switched the locations of two numbers in my external IP address.
All that said, I really appreciate everyone's participation, as your comments helped me to find the modem configuration, which ultimately lead me to the correction of my erroneous IP address, and the multiple necessary solutions to my problem, which has been plaguing me for three days now...
http://www.webopedia.com/TERM/H/host.html
In short, it refers to the computer. Host is usually used in the context of networking.
SSH server binds to certain network interfaces (which usually refer to network cards in a computer).
So, checkout you /etc/sshd_config for
The port should be 22 and ListenAddress should be commented out.
The second step I would take is to ckeck if you can connect to your ssh server through the interface your system is conected to the router.
Post here the output of
ifconfig
iа you don't know how to do that and I'll help you.ps also is there any firewall enabled in your system?
From other answers and comments, I think your ip forward problem looks solved so coming back to the original question about host and localhost: yes, in this case, host is your external IP. Usually,
host
means any host (ip or hostname or url), internal or external depending on the situation andlocalhost
is not any internal IP but the IP of the machine you are working on (lo interface - IP 127.0.0.1) and provided you have something like127.0.0.1 localhost.localdomain localhost
(or only localhost as is the default) in/etc/hosts
you can let it aslocalhost
without substitution.For example you can:
ping localhost
and 127.0.0.1 (your machine loopback interface - lo) should answer.