# ssh, decides to stop in the middle of the night.

## woolsherpahat

I was compiling the newest version of glib, last night.  I logged in remotely then left my emerge running in screen, logged out and went to bed.

Today, I'm greeted with this: 

```
iBook:~ loki$ ssh admin@paperbox

Connection closed by 192.168.100.5

iBook:~ loki$ ssh admin@192.168.100.5

Connection closed by 192.168.100.5
```

I've tried it on both my Mac OS X and Linux box with the same result.  I can ping the remote computer and nmap shows that ssh is running as well, does anyone have any idea what's going on or how I can regain my login?  I'd hate to have to do a cold shutdown and then lug out the extra monitor and keyboard.  

Anyway, bah, nothing like emerge to screw up your day.

----------

## Blubbmon

You can get some more information by trying:

```
ssh -vvv 192.168.100.5 
```

----------

## woolsherpahat

Doh! Can't believe I forgot to do that. Thanks.

 *Quote:*   

> iBook:~ loki$ ssh -vvv admin@192.168.100.5  
> 
> OpenSSH_3.6.1p1+CAN-2004-0175, SSH protocols 1.5/2.0, OpenSSL 0x0090702f
> 
> debug1: Reading configuration data /etc/ssh_config
> ...

 

I tried I quick google search but couldn't find much.  Maybe it's related to mis-matched public or private keys?

----------

## Blubbmon

I found this one: http://www.inf.ed.ac.uk/systems/support/FAQ/#KB1

Did you compiled ssh with kerberos support? Try to remove the use flag if you don't need kerberos authentication and try again  :Smile: 

----------

## pjp

Moved from Other Things Gentoo.

----------

## himpierre

 *Quote:*   

> 
> 
> I was compiling the newest version of glib, last night. I logged in remotely then left my emerge running in screen, logged out and went to bed
> 
> 

 

 :Smile:  Common mistake. You have to restart sshd after compiling glibc. There is no other solution i know of. 

cheers

t.

----------

## woolsherpahat

 *Blubbmon wrote:*   

> I found this one: http://www.inf.ed.ac.uk/systems/support/FAQ/#KB1
> 
> Did you compiled ssh with kerberos support? Try to remove the use flag if you don't need kerberos authentication and try again 

 

You know I can't remember.... I know I didn't specfiy kerberos in my USE flags in /etc/make.conf, but I can't remember if it was included in the default profile USE flags.  My guess is no.

 *himpierre wrote:*   

> Common mistake. You have to restart sshd after compiling glibc. There is no other solution i know of.
> 
> cheers
> 
> t.

 

Oh man, what a downer.  So I'll just have to cold-reboot that sucker?  Ugh.  I'm gonna go straight to bitch-and-moan mode now...

I'm really starting to feel that for me persoanally, gentoo isn't for servers.  You'd think portage would be smart enough to know that after re-compiling glib, ssh is going to be started... if this was a production server things would not be looking good.

----------

## nobspangle

you don't need to reboot the whole box, just restart sshd.

 *10k1 wrote:*   

> if this was a production server things would not be looking good.

 

If this was a production server I doubt you'd be upgrading glibc remotely without any prior testing.

----------

## cuban

 *10k1 wrote:*   

> I'd hate to have to do a cold shutdown and then lug out the extra monitor and keyboard.  
> 
> Anyway, bah, nothing like emerge to screw up your day.

 

This is why I install serial console on all my servers.

----------

## woolsherpahat

 *nobspangle wrote:*   

> you don't need to reboot the whole box, just restart sshd.

 

And how am I supposed to do that if I can't ssh in?

 *nobspangle wrote:*   

> If this was a production server I doubt you'd be upgrading glibc remotely without any prior testing.

 

Well, you do have a point but glsa-check reported that I needed to upgrade glibc.  I assumed portage would inform me that sshd would need to be restarted after compiling glibc.  In fact I would assume portage would automaticlly handle this kind of thing.  

Apparently not.

----------

## MullaXul

I had the same problem with my remote servers.  I just create a simple script that runs the update then restarts sshd when it is done.

----------

## Double Click

Same happened to me while upgrading my servers profile to 2004.3. At first i thought that all is a royal mess but after i found out it is still serving webpage and e-mail flow is still alright - I figured (hoped, prayed etc ect actually) that it was just a matter or restarting the server or restarting sshd.

Eitherway I still have to go the Datacenter and check it out ... really hope nothing else will be jacked up. Luckly this server is not in full production   :Razz: 

Valuable lesson learned .....   :Smile: 

----------

## woolsherpahat

Yeah, well I migrated the server over to debian stable, which I personally feel is more mature and better suited to the task at hand.  Doing system wide updates has yet to repeat this problem but then again, I don't think I've done an update on glibc yet.

----------

## imp

Running sshd under supervise can overcome these kind of problems and it can save you from other sshd crashes.

----------

## woolsherpahat

I'll never install gentoo on another server again.

 *apt-get wrote:*   

> Name Service Switch has changed in the C Library: post-installation question.
> 
> Running programs may not be able to do NSS lookups until they are
> 
> restarted (for services such as ssh, this can affect your ability to
> ...

 

----------

