C
C
Crash2019-10-06 19:15:09
SSH
Crash, 2019-10-06 19:15:09

Why is the connection to the server via ssh hanging?

I connect from the ubuntu terminal via ssh (by key) to a remote server located on AWS. The connection goes well, but literally after a minute an interesting effect is observed - the console stops responding to keyboard input. The cursor continues to blink, and nothing can be entered with all the desire. You have to close the terminal tab and try to connect again.
I tried to connect with the ServerAliveInterval option - no effect. How can the problem be solved?
Some time ago I set up a connection according to this article: https://habr.com/ru/company/intersystems/blog/155565/
The problem went away for a while, but now it's back with the same settings.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
strmaks, 2020-08-28
@strmaks

Try adding the following option to your ssh client configuration ~/.ssh/config:

$ cat ~/.ssh/config
...
Host *
    ...
    ServerAliveInterval 10

The ~/.ssh/config file must have permissions 600 (chmod 600 ~/.ssh/config) The
Host * section must always be at the end of the configuration file
debug mode level 3)
$ ssh -vvv [email protected]
много строк с установлением соединения и инициализацией сессии
debug2: shell request accepted on channel 0
...
       __|  __|_  )
       _|  (     /   Amazon Linux 2 AMI
      ___|\___|___|

https://aws.amazon.com/amazon-linux-2/
[[email protected] ~]$ debug3: send packet: type 80
debug3: receive packet: type 82

messages appearing during "idle" connection:
debug3: send packet: type 80
debug3: receive packet: type 82 Indicates
that keepalive is working.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question