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.
Can't SSH to remote machine: Connection closed by remote host
Hi Linux users:
I am trying to ssh from a Linux (Mandrake 9.2, 2.4.22-10mdk kernel) machine to another Linux (Mandrake 10.0, 2.6 mdk kernel) box on a remote network.
From my machine I can ssh into our linux server on the local network, so I believe my ssh is correctly set up. On the remote machine, PasswordAuthentication is set to be the default "yes".
Here's what happens when I try to ssh to the remote computer.
Code:
[username@IBMFB1L0DH home]$ ssh <remote_ip>
ssh_exchange_identification: Connection closed by remote host
[username@IBMFB1L0DH home]$ ssh -vv <remote_ip>
OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090702f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug2: ssh_connect: needpriv 0
debug1: Connecting to <remote_ip> [<remote_ip>] port 22.
debug1: Connection established.
debug1: identity file /home/username/.ssh/identity type -1
debug1: identity file /home/username/.ssh/id_rsa type -1
debug1: identity file /home/username/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host
debug1: Calling cleanup 0x80627f0(0x0)
[username@IBMFB1L0DH home]$
What's going on? I looked in the sshd_config file of the remote machine, and nothing seems out of the ordinary (to a newbie, anyway). Note: I have physical access to both machines.
there must be some other reasons besides hosts.allow and hosts.deny. i tried many cofig of those two files (empty and allow all), and it is still the same error.. can somebody solve this? sometimes it is ok, sometimes it is not.. and there's nothing edited in the config files.. why is it like that?
This is definitely sshd configuration issue. Restart the sshd and check the /var/log/messages immediately to indentify the problem if any. Check your /etc/ssh/sshd_config
thanks.. actually im using scp. afaik it user the ssh protocol. and i got the same error msgs. i don't edit mo modify the config but sometimes if fails sometimes it does not.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.