4

Yesterday I got my Raspberry Pi B+, which I use via SSH. Sometimes the SSH typing takes about 5s and more to respond with an visual feedback after a time of idleness, after that lag everything just works fine.

(I started typing the moment the gif starts.)

I know the Raspberry Pi is no super modern MacBook Pro, but it's still kind of strange. I checked the connection, and checked my terminal setting, tried reconnecting with the pi and checked if other servers I use respond similar, but everything works fine with other servers. Could anybody tell me if they have the same problem and if so how to solve it?

migrated from stackoverflow.com Oct 5 '14 at 3:56

This question came from our site for professional and enthusiast programmers.

1

Is your PI running the stock raspbian image? If not please check following things:

  • Is your PI under heavy load? Check with uptime.

05:06:50 up 7 days, 17:49, 1 user, load average: 0.00, 0.01, 0.05

  • Does the PI behaves the same if you log in locally using monitor / keyboard.
  • Does the PI behaves the same if you use another machine to ssh from?
  • Is your network under heavy load and running slow?

Your problem seems to be unrelated to coding in general. Maybe ask this question in another community like Super User

  • 1
    It turned out to be be ClientAliveInterval of the openSSH server. That solved it. Thanks for the advise to another community, I didn't know that, I am deeply sorry. It will not happen again. – TimKaechele Sep 6 '14 at 7:21
1

It seems the OP has already found the solution. This answer is for future reference.

The OP's comment:

It turned out to be ClientAliveInterval of the openSSH server. That solved it.

The comment gives no further details. Fortunately quick Google search led to a post on www.raspberrypi.org:

by TimKaechele » Mon Sep 01, 2014

You can solve the problem in two ways:

  • setting the ServerAliveInterval to a number of seconds less than the time it takes to time out the connection,
  • or by configuring the SSH server's ClientAliveInterval (same process).
0

I had a different issue on the RPi 3, with the same symptoms. Here is the source for the solution.

In summary, some routers seem to have issues with new versions of SSH using a different value for IPQoS by default (mine seems to be a notoriously bad router + modem combo, so I'm not surprised). To fix this, add IPQoS 0x00 to sshd_config and ssh_config

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.