4

when I connect using /usr/bin/ssh to VPS machines (centos 7), after some little time my keyboard is not working on terminal, when not using ssh I can use terminal normally.

My ubuntu version :

NAME="Ubuntu"
VERSION="19.10 (Eoan Ermine)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 19.10"
VERSION_ID="19.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=eoan
UBUNTU_CODENAME=eoan

uname -a

Linux xxxx 5.3.0-42-generic #34-Ubuntu SMP Fri Feb 28 05:49:40 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I tried this :

sudo apt-get install xserver-xorg-input-all

and not solved the problem. It does not look like sticky keys problem either

I am open to any suggestion to look, it is so annoying that I can not use ssh properly because it is mostly my job is it in.

Sahin
  • 43

1 Answers1

3

The connection to the server gets lost, but your ssh client does not know about it yet, sending keyboard input and waiting for a response.

That happens because some SSH servers will kick idle clients after a period of time (usually 120 seconds). You need to tell your client to send some packages to the server from time to time to show that you're not idle.

Try setting ServerAliveInterval 120 in .ssh/config file or add as a command line option to ssh: -o ServerAliveInterval=120.

See: How to prevent "Write Failed: broken pipe" on SSH connection?

pLumo
  • 27,991