# [SOLVED]ssh connection closed

## dreadlorde

My ssh server magically stopped accepting connections. This is what ssh -v shows when I try to connect.

```

[~]% ssh root@111.111.11.111 -v

OpenSSH_5.6p1, OpenSSL 1.0.0a 1 Jun 2010

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: Applying options for *

debug1: Connecting to 111.111.11.111 [111.111.11.111] port 9922.

debug1: Connection established.

debug1: permanently_set_uid: 0/0

debug1: identity file ~/.ssh/identity type -1

debug1: identity file ~/.ssh/identity-cert type -1

debug1: identity file ~/.ssh/id_dsa type -1

debug1: identity file ~/.ssh/id_dsa-cert type -1

ssh_exchange_identification: Connection closed by remote host

```

My config hasn't changed since I first set up the server.

sshd_config

```

Port 9922

AddressFamily any

ListenAddress 0.0.0.0

Protocol 2

KeyRegenerationInterval 3600

ServerKeyBits 1024

SyslogFacility AUTH

LogLevel INFO

LoginGraceTime 600

PermitRootLogin yes

MaxAuthTries 4

MaxSessions 10 

MaxStartups 10

RSAAuthentication no

PubkeyAuthentication no

AuthorizedKeysFile   %h/.ssh/authorized_keys

RhostsRSAAuthentication no

IgnoreUserKnownHosts no

IgnoreRhosts yes

PasswordAuthentication yes

PermitEmptyPasswords yes

X11Forwarding no

PrintMotd no

PrintLastLog no

PidFile /var/run/sshd.pid

```

ssh_config

```
Host *

ForwardAgent no

ForwardX11 no

RhostsRSAAuthentication no

RSAAuthentication no

PasswordAuthentication yes

BatchMode no

CheckHostIP yes

AddressFamily any

IdentityFile ~/.ssh/id_dsa

Port 9922

Protocol 2

Cipher blowfish

EscapeChar ~

```

I've checked /etc/hosts.deny for my ip and it's not in there.

Anyone know what might be going on?

----------

## magic919

I'd expect the server logs to be more helpful.  Maybe the upgrade to OpenSSL 1.0?

----------

## Jaglover

Have you tried to log in as user, root logins are ...

----------

## dreadlorde

I solved this. I needed to add `sshd: ALL` to /etc/hosts.allow. Not sure if it's the safest thing, but it works for now.

----------

