I am using Ubuntu 16.04 to connect to a Centos7 server using key-based authentication.
Sometimes the connection succeeds, sometimes it has a Timeout error, sometimes on the server it just does not respond to keyboard inputs.
First I thought that it was related to the server. But I tested the connection on Windows 10 using Putty, and it worked without problems. Also I experienced this with AWS servers. So I think it is related to my Ubuntu client. Because from the PuTTY it all goes perfect.
Also: I went with some unsuccessful tries to server. But from the top command (using Windows Server) I see connections which hang.
Settings for connecting taken from /etc/ssh/ssh_config and ~/.ssh/config (I removed which are commented with #)
Host *
HashKnownHosts yes
GSSAPIAuthentication yes
GSSAPIDelegateCredentials no
KeepAlive yes
TCPKeepAlive yes
ServerAliveInterval 60
ServerAliveCountMax 5
GSSAPIAuthentication no
Here is an unsuccessful attempt to connect:
debug1: Authentication succeeded (publickey).
Authenticated to 91.92.128.50 ([91.92.128.50]:22).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: receive packet: type 80
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug3: receive packet: type 91
debug2: callback start
debug2: fd 3 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IP_TOS 0x10
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug3: send packet: type 98
debug2: channel 0: request shell confirm 1
debug3: send packet: type 98
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug3: send packet: type 80
debug3: send packet: type 80
debug3: send packet: type 80
debug3: send packet: type 80
debug3: send packet: type 80
Timeout, server 91.92.128.50 not responding.
Sometimes when the session hangs and I am on the server I get these notifications in the terminal. (I connected with the -vvv option)
[aeliv@v20920 ~]$ debug3: send packet: type 80
debug3: receive packet: type 82
[aeliv@v20920 ~]$
[aeliv@v20920 ~]$ debug3: send packet: type 80
debug3: receive packet: type 82
debug3: send packet: type 80
debug3: send packet: type 80
