LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-11-2009, 10:50 PM   #31
rarsa
Member
 
Registered: Nov 2004
Location: Canada
Distribution: Puppy Linux/ Mint
Posts: 211

Rep: Reputation: 31

Most likely your server is listening in a different port, not the default 22
 
Old 02-18-2010, 06:47 AM   #32
kvarkki
LQ Newbie
 
Registered: Feb 2010
Posts: 5

Rep: Reputation: 0
Note: The protection software "denyhosts" in the server put you to blacklist if you use more than three times wrong keys/password.
 
Old 02-21-2011, 06:21 AM   #33
Ganesh Manohar
LQ Newbie
 
Registered: Feb 2011
Posts: 1

Rep: Reputation: 0
network closed remotely

Jerks!

Remove /etc/nologin if any

-GM
 
Old 05-24-2013, 09:04 AM   #34
bsvl
LQ Newbie
 
Registered: May 2013
Location: Costa Rica
Distribution: Debian - ubuntu - slackware
Posts: 2

Rep: Reputation: Disabled
When using SSH this error may show it's ugly head on occasion. Many searches for the issues point to funny TCP connection tweaks or that sshd needs to be re-configured. This is not the case.

Symptoms
Connecting to SSH servers gives this message:
$ ssh atom@example.com
ssh_exchange_identification: Connection closed by remote host
Or maybe this if using verbose mode.
$ ssh -v atom@example.com
OpenSSH_4.7p1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to example.com [10.65.0.2] port 22.
debug1: Connection established.
debug1: identity file /home/atom/.ssh/identity type -1
debug1: identity file /home/atom/.ssh/id_rsa type 1
debug1: identity file /home/atom/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host
Solutions
This can be caused by a number of issues, steps to test are as follows.

Check /etc/hosts.deny and /etc/hosts.allow

Many have reported configuring these to values properly has helped. However, we've seen this issue even when hosts.* files were not a factor.
root@host # grep sshd /etc/hosts.allow
sshd: ALL
Missing Dependencies

This one typically happens after a glibc or openssl upgrade. Many distros can install updates to glibc or openssl libs and not require a restart to sshd.

On any distro you can recognize it when after an update, then use lsof to see where sshd has open files. Some will be pointed to DEL, because those libs were deleted on update.
~ # lsof -n | grep ssh | grep DEL
When an SSH connection comes in the sshd daemon forks and attempts to attach (ld) these lib files, and fails resulting in this error.

Corrupted Fingerprint / Keys

Some how one or the other of the fingerprints or keys has become corrupted (did you manually edit one of these files?). Remove the server-side fingerprint in the clients ~/.ssh/known_hosts and try again. When you re-connect you will be prompted to accept the host identity again.

If you are able to access the machine another way you may want to back-out and re-create the server-side ~/.ssh/authorized_keys.

Along the same lines as this issue, if the files /etc/ssh/*key* are removed and sshd is not restarted then this error will show up too. Check for the key files in the sshd configuration directory.

Heavy Server Load

Have also seen this happen when server was under heavy load from for example, brute force attack. Increase the amount of connections sshd can run.
root@host # grep MaxStartups /etc/ssh/sshd_config
# Old Style
MaxStartups 12
# New Style
MaxStartups 10:20:30
~~~~~~~~~~~~~~~~~~~~~~~~~
Brayan Sneider Vargas Lozada
COL - CR
 
Old 05-24-2013, 09:28 AM   #35
bsvl
LQ Newbie
 
Registered: May 2013
Location: Costa Rica
Distribution: Debian - ubuntu - slackware
Posts: 2

Rep: Reputation: Disabled
Red face another solution...

if ↑ the post doesnt help u......just restart your server.! It will work.
 
Old 10-23-2017, 12:21 AM   #36
linuxminion
LQ Newbie
 
Registered: Oct 2017
Location: Sydney,Australia
Posts: 1

Rep: Reputation: Disabled
I had a same issue (below) and fixed by adding the releavant network address in /etc/hosts.allow

I had a same issue (below) and fixed by adding the releavant network address in /etc/hosts.allow

[abc@host1~]$ ssh host2
ssh_exchange_identification: Connection closed by remote host

Fix:
Added entry as below in host2 /etc/hosts.allow file

ALL: 10.48.0.0/13
 
  


Reply

Tags
resolve, ssh, sshd, sshexchangeidentification



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh_exchange_identification: Connection closed by remote host piter23 Linux - Software 17 09-11-2013 09:59 AM
rndc: connection to remote host closed. james.farrow Fedora 2 06-16-2004 11:40 AM
ssh_exchange_identification: Connection closed by remote host liguorir Linux - Software 3 09-18-2003 11:42 AM
ssh_exchange_identification: Connection closed by remote host ctav01 Linux - Networking 1 08-22-2003 07:14 PM
Ftp Connection closed by remote host 360 Linux - Networking 16 05-29-2002 04:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration