Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm currently trying to allow my computer to be remotely accessed via ssh. The computer is running Ubuntu 11.10. I've used ssh on several occasions in the past, but I've only used the basic features and I've always been on the client side.
I've installed ssh and when try something like:
Code:
ssh localhost
It seems to work without a problem. The problem arises when I to ssh via my public IP:
Code:
ssh XX.XX.XX.XX
This will sit there for quite a while then return something along the lines of:
Code:
ssh: connect to host XX.XX.XX.XX port XX: Connection timed out
I'm attempting to use the host computer to try to connect to itself through the public IP for testing purposes, but I don't think that should be the cause of the problem. I suspect that it has to do with the settings on my router, but I'm not sure. Any suggestions? Thanks.
So your computer is behind a router. Do you have port forwarding set up on the router to forward port 22 to the machine running sshd?
Thanks for the quick reply. I attempted to setup the port forwarding, but I likely have done something incorrectly. Also, I changed the ssh server from port 22 to another port and my commands to connect have actually been something more along the lines of:
Code:
ssh -p XX localhost
In any case, the same timeout error arises using port 22 or not. So likely it is the port forwarding. I have added forwarding entries for UCP and TCP on port 22 or equivalent to the local address of my machine. As far as I can tell, it looks like it's correct, but clearly it's not working so I must be doing something wrong. Any idea from here?
Normally the isp blocks standard ports as you have changed ssh port it should be ok have you checked what ports are open from the outside http://nmap-online.com/
Ask them, look at the website.
You could however try to connect from another computer, outside your LAN.
Some routers don't support requests from the inside to the outside and back in.
Try an online portscanner. http://www.derkeiler.com/Service/PortScan/
Normally the isp blocks standard ports as you have changed ssh port it should be ok have you checked what ports are open from the outside http://nmap-online.com/
I used this link and based on it's results I see that the port I have for the ssh is tcp and it is open. So perhaps the router is setup correctly and it's just having problems when it is redirected to my machine? Does Ubuntu initially have any firewall or anything which would prevent the connection? Just as a reminder, I'm still receiving the time out error.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.