[SOLVED] ssh login doesn't work with domain forward
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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've got a domain name registered. In the control panel I've set the domain to forward to my personal IP address.
So I login from another location with the domain name and I get a message to trust the server (yes or no) which is normal and I get a password prompt so somehow it works. When I input the password I get:
Code:
Permission denied, please try again.
and then I can try again.
If I do exactly the same login attempt from the same host but instead of the domain I use the exact IP address everything works well.
Aha, that's probably the problem. It resolves to a different address ... ? How's that possible? Could it be that it resolves to the IP address of the company that hosts my website (and redirection service) ?
If the hosting company is doing http redirects for your domain name, then yes, your domain name resolvs to their server. There's no such thing as redirects for SSH.
If on the other hand the DNS A record for your domain points to your private IP address, it should work regardless of service.
Ask the hosting service if they can also forward the ssh port to your server. If they can, it wouldn't matter what IP the domain resolves to. BTW you might want to move the ssh port to something unused outside of the privileged ports. (0-1023) I use ports up around 8000 for shh, the service will announce itself if all ports are scanned, but a lot of the script-kiddie junk only polls known ports for services. (21,22,53,80 etc etc)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.