# ssh problems

## npmccallum

I am having a problem whenever I ssh to one of my boxes, I fairly regularly get disconnected.  It usually says "Disconnecting: Corrupted MAC on input.", but sometimes it says "Disconnecting: Bad packet length -619321160."  sometimes, it just freezes with no statement.  I can immediately log back in, so its not locking up.  I have tried 2 different network cards, so its not a hardware problem with them.  What else am I missing?

----------

## DrkPlague

try pinging the boxes and seeing if you are getting packetloss.  it sounds like a bad/mis-crimped cable.  try replacing the cable.

----------

## npmccallum

 *DrkPlague wrote:*   

> try pinging the boxes and seeing if you are getting packetloss.  it sounds like a bad/mis-crimped cable.  try replacing the cable.

 I have used different cables and different jacks. Also, after the pinging: 0% packet loss.

----------

## npmccallum

I have tried various linux distrobutions, all of them have the same problem.  I think it is a mobo issue.  I installed FreeBSD on it, and it works fine.  Strange....

Nathaniel

----------

## puggy

Have you tried disabling ACPI and/or APIC in the kernel?

Puggy

----------

## npmccallum

 *puggy wrote:*   

> Have you tried disabling ACPI and/or APIC in the kernel?
> 
> Puggy

 yeah, thats the first thing I did... very strange...

----------

## uzik

This sounds like a hardware problem. A simple ping test of a few

seconds doesn't convince me it's not. I have a NIC that loses a lot

of packets and I'm told all of that brand did that. If you run 

ifconfig how many error packets does it tell you it's had? If you have

replacement hardware (not the same brand) that might be a good

way to find this. Watch the error rate with different hardware and

see if it changes when you replace pieces one at a time.

----------

## npmccallum

 *uzik wrote:*   

> This sounds like a hardware problem. A simple ping test of a few
> 
> seconds doesn't convince me it's not. I have a NIC that loses a lot
> 
> of packets and I'm told all of that brand did that. If you run 
> ...

 I thought so too, but now I think it is a driver problem.  I tried two different nics in the machine, different brands, one pci - one isa, but both used the tulip driver.  same problem with both cards.  I moved to freebsd, and I have not had any problems.  Thus I suspect that it is a problem with the linux tulip driver and my mobo(and maybe mobo drivers?).  It is one of the strangest problems I have ever seen. Well, besides the time a system was unstable and we replaced everypart but the case (we did switch the ps) and it was still unstable.  Anyway, I think it is the Tulip driver.

nathaniel

----------

## uzik

Sounds like you've got it pretty well pegged.

----------

## Buzz

 *npmccallum wrote:*   

> I thought so too, but now I think it is a driver problem.  I tried two different nics in the machine, different brands, one pci - one isa, but both used the tulip driver.  same problem with both cards.  I moved to freebsd, and I have not had any problems.  Thus I suspect that it is a problem with the linux tulip driver and my mobo(and maybe mobo drivers?).  It is one of the strangest problems I have ever seen. Well, besides the time a system was unstable and we replaced everypart but the case (we did switch the ps) and it was still unstable.  Anyway, I think it is the Tulip driver.
> 
> nathaniel

 

I had this problem occur with my cheap linksys router.  I bought a new wireless router to accommodate my laptop and switched the server to the wireless router and all the problems went away.  This was after research online indicating the problem to be with the router (I was not the only one experiencing this with the router)

Good luck

Buzz

----------

## KahdgarXI

I am having a similar problem, except 'Disconnecting: Corrupted MAC on input.' us the only error I ever get. Based from advice I got, I guessed it was a hardware problem, and replaced the motherboard AND the nic. (I was planning on doing this anyways) Yet, I'm still having the problem. The old nic was onboard on my old motherboard, using the sis900 driver, this one used the 3c59x driver. Also, I have upgraded kernels from 2.4 to 2.6.1, and I'm getting the problem in all cases. ifconfig reports 0 error packets, althought the connection has only been up for a few minutes without much traffic, but, since the connection has been up I have been disconnected. I have no idea where to look. I am using a cheap linksys router, but, the client box and the server box are both connected to the same switch (not linksys) which is uplinked to the router. I have no idea what to do from here.. Oh, btw, I've switched cables too..

----------

## voidx

hi!

I know this kind of problems - in most cases much more difficult to identify than resolve  :Wink: 

Original post seems really like driver problem, but from what I have read about Kahdgar's problem it seems more like hardware than software related to me - different kernels, different drivers, I can't imagine where else the bug can be hidden (?maybee some problem with iptables?) if I eliminate the possibility of some old really nasty bug in deepnes of kernel source  :Wink:  or in sshd ? 

You said that you changed nic,mb,cable so last point on the way is your switch - I would try to change it if it is possible just to be sure that hardware is ok. The router is not involved in this problem if I understand right. 

Maybee Im totally wrong, I wrote only what is flowing through my poor brain-pipe at the moment  :Wink: 

----------

## dj_goku

I have epox 4-beav, 3c59x boomerang driver, newest stable sshd. I never have a problem losing connection. I use only version 2 to login. I think that is something with your configs.

dj_goku

----------

## voidx

AFAIK there is not many options in sshd config to change and especially to get these strange errors. And if there is something wrong, you'll rather experience auth problems... Only bad config I could imagine is something in iptables maybee...

----------

## KahdgarXI

I'm not using iptables at all, so it can't be a problem with that, unless of course there's some default something-or-other that installs iptables for me, but I'm pretty sure there isn't...

```

Frog root # emerge -p iptables

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N    ] net-firewall/iptables-1.2.8-r1

```

Also...

```

Frog root # uptime && ifconfig eth0

 06:17:41 up 3 days, 10:44,  2 users,  load average: 0.05, 0.02, 0.00

eth0      Link encap:Ethernet  HWaddr 00:A0:24:6D:09:09  

          inet addr:192.168.1.9  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:387291193 errors:0 dropped:0 overruns:0 frame:0

          TX packets:387614488 errors:0 dropped:0 overruns:0 carrier:0

          collisions:2590 txqueuelen:1000 

          RX bytes:837588425 (798.7 Mb)  TX bytes:3400982375 (3243.4 Mb)

          Interrupt:10 Base address:0xc000 

```

I just noticed there's a new version of openssh, I'll see if that does anything. And, if I ever get a chance, I'll see if I can hunt down one of my old hubs and give it a try... Any other input would be very appreciated. Thanks again

-KahdgarXI

----------

## voidx

I'm waiting for results, Im quite interested in it, you never know when such problems appear on own network  :Wink: 

----------

## martap

It could also be a duplex mismatch. Never force a speed/duplex on one end and not on the other. So for example, if you have a cheap switch that doesn't support setting the speed/duplex manually then leave your PC on auto sensing. 

When you set one side on auto sensing and the other on for example 100/full - the auto sensing side will work on 100/half. This is because no "auto sense duplex messages" are received by the auto sense side and will fall back to the lower setting which is half duplex...

hope this helps...

----------

## KahdgarXI

Well, it looks like all is well. Since the new version of openssh (openssh-3.7.1_p2-r1) everything seems to be working fine. I haven't had a single disconnect since. For testing, I ran six terminals on another box, all doing a cat /dev/urandom just to make it transfer a lot of data. I left it running for at least 12 hours, and everything seems to be good. I just hope I'm not speaking too soon. Well, that's that. Thanks for the help and advice.

----------

## jsa

aloha,

noacpi noapm options for kernel loading fixed it for me (installing gentoo on an old hw)

jakub

----------

## KahdgarXI

did you put those arguments on the server or the client?

thanks

-KahdgarXI

----------

