# kernel 2.6.31 and ssh

## binro

I just upgraded a laptop to be completely current and installed the 2.6.31 kernel. All appeared to work well until I tried to ssh into it from another host. You get the logon banner and a prompt but when you enter a command, you receive either no output or a few lines. After that the session hangs. I rebooted with the previous 2.6.28 kernel and the problem was gone. The laptop does not offer many services but I could do a remote mysql login and got normal output, so I don't think it is a general problem. Sessions from the laptop work normally. Upgrading to the latest unstable openssh does not help. A bit of a poser, any ideas (a search finds nothing)?

TIA

----------

## binro

I just enabled telnet and the behaviour is exactly the same: you get a prompt, type a command and the session hangs.

----------

## jcat

Nothing in dmesg or /var/log/messages etc?

Cheers,

jcat

----------

## Herring42

Maybe not helpful, but no problems with ssh on 2.6.31

```

$ uname -a

Linux path 2.6.31-gentoo #2 SMP PREEMPT Wed Sep 16 14:12:46 BST 2009 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux

```

----------

## binro

 *jcat wrote:*   

> Nothing in dmesg or /var/log/messages etc?
> 
> 

 

Not to do with ssh. I am getting intermittent network errors, e.g., syslog-ng keeps losing its connection with the main server. 

I built 2.6.30-r6 and got exactly the same problem. 2.6.28-r2 however, which I had been using for months, works perfectly, no ssh hangs, no network errors.

----------

## binro

 *Herring42 wrote:*   

> Maybe not helpful, but no problems with ssh on 2.6.31
> 
> ```
> 
> $ uname -a
> ...

 

Must be something in the kernel config. Did something significantly change after 2.6.28?

----------

## Hu

The kernel regularly undergoes significant changes between releases.  You will need to be a bit more specific with your question.  Answering jcat's question about dmesg might tell us more.  It would also be helpful to know what network card you use, and the kernel driver for it.

----------

## bombcar

My guess is it has something to do with allocating a virtual terminal (VTTY).

Check if the commands actually run. Check the logs. Run ssh with -v. Check your kernel config and compare them. Use genkernel to build a default kernel.

----------

## ToeiRei

What about the network card used?

If you want to, we can check your kernel .config / dmesg

Rei

----------

## binro

The NIC is a Aetheros wifi card using the ath5k drivers in the kernel. These work fine at 2.6.28. There are no messages in the logs from the drivers, only messages from services because the connections keeps dropping. To summarise:

[*]ssh and telnet into the laptop hang after a few bytes

[*]PHPMyAdmin cannot connect to MySQL on the laptop

[*]syslog-ng and nfs sessions out of the laptop keep on dropping and reconnecting

Currently I am taking the .config from 2.6.28 kernel (which works) and dropping it into the 2.6.31 kernel as is, except to use the in-kernel sound and video drivers. I will see if that works.

----------

## binro

No difference.   :Sad:   Could the ath5k drivers have gone bad some time after 2.2.28? Falling back to madwifi-ng is not an option since they don't compile against 2.6.31.

----------

## ToeiRei

So the problem is not the kernel itself - it's the Aetheros drivers.

Which wlan stack are you using?

----------

## binro

 *ToeiRei wrote:*   

> So the problem is not the kernel itself - it's the Aetheros drivers.
> 
> Which wlan stack are you using?

 

Whether it's the drivers is not proven, it's just a possibility. I am not sure what you mean by "wlan stack", I fire up the card with wicd, specifying wext.

----------

## ziggysquatch

Is wicd crashing then?  Does this occur when you manually connect wirelessly with iwconfig commands?  Does the laptop have a wired connection that you could test to see if it is related strictly to the wireless card?

----------

## binro

I went down my local bar, had a few beers, and pondered. The laptop has an ethernet socket, of course, after so many years of wifi I had forgotten about it! 

I plugged in a cable and then everything worked perfectly. The ath5k drivers have gone bad. I have a D-Link DWL-G650 card which is pretty mundane. 

So to whom do I complain about this?

----------

## ToeiRei

Well - Time to check the card and its drivers. Your kernel .config, please - so we can answer your question.

----------

## binro

 *ToeiRei wrote:*   

> Well - Time to check the card and its drivers. Your kernel .config, please - so we can answer your question.

 

OK, you can find it at http://www.binro.org/config-2.6.31-gentoo

HTH

----------

## binro

I have found a work-around for the problem by installing madwifi-trunk-r4097-20090920 from the madwifi snapshots http://snapshots.madwifi-project.org/madwifi-trunk. I had to compile it manually (I can't find a working ebuild) but at least I can now use the new kernel (which solves other problems for me).

HTH   :Very Happy: 

----------

## binro

 *binro wrote:*   

> I have found a work-around for the problem by installing madwifi-trunk-r4097-20090920 from the madwifi snapshots http://snapshots.madwifi-project.org/madwifi-trunk. I had to compile it manually (I can't find a working ebuild) but at least I can now use the new kernel (which solves other problems for me).
> 
> 

 

Hmm, I spoke too soon. The ssh, etc., sessions no longer hang up completely but performance becomes extremely sluggish, with some sessions timing-out. Think I will take this to the madwifi fora.

----------

