Can't SSH to remote machine: Connection closed by remote host
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.
...at me, the same problem occured in a freshly installed linux. The solution was to configure the /etc/hosts.deny because it had by default an
ALL: PARANOID
line in it which prevented me to log in from my notebook (which actually was not having a reverse lookup-enabled domain name - ip address pair).
Anyway, this was the simple problem with it.
For a workaround, when you can't get into your system from a previous DHCP enabled machine try logging onto another server having a fixed IP-DNS pair and try logging onto your server from there possible with much higher success ratio and you can fine tune your /etc/hosts.deny file from there...
Be careful the /var can has /var/www or other folders that probably will have other permissions.
For get ssh working in my case I just did:
chmod 775 /var/run/sshd
chown root:root /var/run/sshd
/etc/init.d/ssh restart
Some of my RHEL servers tends to respond very slow as we connect through ssh and take longer time to give login prompt. When I get authenticated and log in, it works as usual. Is there any reason for this ?
Cannot set up an ssh tunnel from my localhost to a remote machine.
Hi all:
I am trying to set up an ssh tunnel from my machine (in India) to a server (in US). How do I do it? The problem is: I have to first create a tunnel to Server-1 and then another from Server-1 to Server-2. The point here is: I have to establish a tunnel from my machine to Server-2. Can you please help me establish one?
The reason it takes a long time to get the login prompt is usually that the host cannot resolve the DNS name of the client, so it waits until to reslove attempt times out and then proceeds. Solve this by making sure the client is resolvable by the DNS that the server connects to, or just manually add the client to the /etc/hosts file - it usually fixes things.
Guess the sshd tryes to resolve the name of the clients for logging purposes or something...
I too had that idea and to test that I have also added the corresponding entry in the /etc/hosts file and it did not help. I tried and verbose option and it waits unusually long at the authorization phase.
What's in the logs on the server? It should give a reason.
Check /etc/hosts.allow and /etc/hosts.deny.
THANK YOU. Switching subnets and networks in the office and for days couldn't figure out why certain servers were pingable but just dropping ssh packets.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.