SSH not working from other ubuntu server, but from windows?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Why are you using port 24? Multiple computers can connect on port 22 and multiple servers can listen on port 22, so I don't follow your logic.
Do you have the ssh daemon running on the server? Do you have port 22/24 open on the firewall? Exactly what message do you get when you try to connect?
Is the <external ip> you have mentioned on the lan or on the internet somewhere else. If it is on site, you need to connect to it on the lan through a lan interface with a local ip. That interface needs the ssh port open as well in the firewall.
Also try using the verbose option "-v" to get more information on why you can't connect. It could be a connection problem or an authentication problem.
me@myserver:~$ ssh -v 66.58.130.227:24
OpenSSH_4.7p1 Debian-8ubuntu1.2, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
ssh: 66.58.130.227:24: Name or service not known
I can, however, connect with windows to both of them, so I know ssh is running and is accepting connections on the ports I specified. I'm using my external IP (ISP assigned IP, not router-assigned) to connect, hence the different ports.
I don't have a firewall running on the linux machines, I don't have anything to safeguard.
Quote:
Why are you using port 24? Multiple computers can connect on port 22 and multiple servers can listen on port 22, so I don't follow your logic.
Do you have the ssh daemon running on the server? Do you have port 22/24 open on the firewall? Exactly what message do you get when you try to connect?
When I use my external IP address I have 22 and 24 forwarded so I can go straight to the computer I choose. If there's a way for both of them to listen on 22 and know which one I'm talking about then please share, you know something I don't :P
Last edited by SimbaSpirit; 06-21-2008 at 09:35 PM.
Why are you using port 24? Multiple computers can connect on port 22 and multiple servers can listen on port 22, so I don't follow your logic.
Do you have the ssh daemon running on the server? Do you have port 22/24 open on the firewall? Exactly what message do you get when you try to connect?
If he also want to access his computers from the Internet, then he will be able to forward different ports at the router to different hosts. However most routers will enable one translate ports as well.
When I use my external IP address I have 22 and 24 forwarded so I can go straight to the computer I choose. If there's a way for both of them to listen on 22 and know which one I'm talking about then please share, you know something I don't
I meant that one may be able to forward from port 24 on the router input to port 22 on a certain machine, using the router's configuration alone. Which I believe was a question on post #4.
It depends on the router, but this would allow using the standard ssh server configurations.
Ok I see where you were coming from. While that would have worked too, it's more work than it's worth to do it that way at this point, as easy as it is xD
I put linux on my router not that long ago, so glad I did.
You need to balance the work in configuring the router to forward the different ports to different IPs at port 22 versus the work needing to use different ports for each host when working inside the LAN. You either need to remember that hostA used port 22 while hostB uses port24, etc. or create a wrapper that remembers this for you. IMHO, it would be easier to have the hosts inside the LAN using the same port.
--- I am impressed that the Firefox browser flagged 'lan' as misspelled and LAN as correct and recognized IMHO!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.