# [SOLVED] SSH - missing keytype/connection closed

## salmonix

Hi there, 

symptoms: trying to log in via ssh and get this:

 *Quote:*   

> OpenSSH_5.1p1, OpenSSL 0.9.8j 07 Jan 2009
> 
> debug1: Reading configuration data /etc/ssh/ssh_config
> 
> debug2: ssh_connect: needpriv 0
> ...

 

It just happened (mystically, I may add). Today at 10 all was fine, shut client down. Evening up, trying to ssh to a particular server and all is this I have. No change, nothing in config files. Oh, but I can ssh into my laptop normally, for example.

id_rsa starts with this:

 *Quote:*   

> -----BEGIN RSA PRIVATE KEY-----
> 
> 

 

ends with -----END.

And -rw------, pub. is -rw-r--r--.

I have not put my pubkey onto the server, laziness, so I always type password.

In ssh_config everything is commented, so factory defaults are in use. The responsiveness is also suspicious: as command is typed, I have the message immediately. I doubt that connection can be established at this speed with that server. (ping gives 44.762ms, plus the server is sleeping, so it must WoL before answer. The server is a Gentoo AMD64 server, installed 3 days ago.)

What I have done: checked key with ssh-agent. It is accepted. Regenerated key. Reinstalled ssh absolutely. Drank a bitter herb tea (awful, but ...maybe) Nothing, but the sad picture I described.

Begging for help.

----------

## salmonix

Now,  life is back. I managed to restart the server manually and woah! I am in. Checking messages showed only the last successful login. Meanwhile also some light is thrown on the reason: due to some network breakdown (trustful ISP) the connection became blurred. The machine that was connected to the server (say, A) was not able to ssh in again (and at all from then on), but a different one (say,B) could. 

I saw that despite of the fact that I shut down the terminal on the client A, the server still saw A logged-in on ptty/0 this case - I saw it logged in from a machine B. I killed the sshd related to that login, even restarted sshd, but still machine A is refused. (That is a WinXP with Putty, putty says : connection refused.)

Also It might have happened that too many ptty was left opened due to these malhereuse events.

The problem is that this communication breakdown can happen any time and I do not have one around to manage this server manually. Any idea how to workaround the buggy connection generated ssh logging problem?

----------

## salmonix

They would do: (man shd_config)

 *Quote:*   

>  ClientAliveCountMax
> 
>              Sets the number of client alive messages (see below) which may be sent without sshd( receiving any messages
> 
>              back from the client.  If this threshold is reached while client alive messages are being sent, sshd will discon‐
> ...

 

So, servers would log me out. Great. Cheers.

----------

