LINUX.ORG.RU
решено ФорумAdmin

Очень долгое подключение по ssh

 ,


0

1

создал виртуальну машину, установил rhel.
при попытке подключения по ssh, после ввода пароля идет очень долгое ожидание.
не могу понять как его убрать.
Запустил ssh c DEBUG3.
Прикрепляю лог.
По timestamp можно понять какие ожидания.
После того, как подождешь и подключишься - все работает нормально.

Aug 31 11:18:37 localhost sshd[12651]: debug3: fd 5 is not O_NONBLOCK
Aug 31 11:18:37 localhost sshd[12651]: debug1: Forked child 12797.
Aug 31 11:18:37 localhost sshd[12651]: debug3: send_rexec_state: entering fd = 8 config len 734
Aug 31 11:18:37 localhost sshd[12651]: debug3: ssh_msg_send: type 0
Aug 31 11:18:37 localhost sshd[12651]: debug3: send_rexec_state: done
Aug 31 11:18:37 localhost sshd[12797]: debug3: oom_adjust_restore
Aug 31 11:18:37 localhost sshd[12797]: debug1: Set /proc/self/oom_score_adj to 0
Aug 31 11:18:37 localhost sshd[12797]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Aug 31 11:18:37 localhost sshd[12797]: debug1: inetd sockets after dupping: 3, 3
Aug 31 11:18:37 localhost sshd[12797]: Connection from 10.0.2.2 port 60881 on 10.0.2.15 port 22
Aug 31 11:18:37 localhost sshd[12797]: debug1: Client protocol version 2.0; client software version PuTTY_Release_0.70
Aug 31 11:18:37 localhost sshd[12797]: debug1: no match: PuTTY_Release_0.70
Aug 31 11:18:37 localhost sshd[12797]: debug1: Local version string SSH-2.0-OpenSSH_7.4
Aug 31 11:18:37 localhost sshd[12797]: debug1: Enabling compatibility mode for protocol 2.0
Aug 31 11:18:37 localhost sshd[12797]: debug2: fd 3 setting O_NONBLOCK
Aug 31 11:18:37 localhost sshd[12797]: debug3: ssh_sandbox_init: preparing seccomp filter sandbox
Aug 31 11:18:37 localhost sshd[12797]: debug2: Network child is on pid 12798
Aug 31 11:18:37 localhost sshd[12797]: debug3: preauth child monitor started
Aug 31 11:18:37 localhost sshd[12797]: debug1: SELinux support disabled [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: privsep user:group 74:74 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug1: permanently_set_uid: 74/74 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: ssh_sandbox_child: setting PR_SET_NO_NEW_PRIVS [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: ssh_sandbox_child: attaching seccomp filter program [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug1: list_hostkey_types: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: send packet: type 20 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug1: SSH2_MSG_KEXINIT sent [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: receive packet: type 20 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug1: SSH2_MSG_KEXINIT received [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: local server KEXINIT proposal [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,cast128-cbc,3des-cbc [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,cast128-cbc,3des-cbc [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: compression ctos: none,zlib@openssh.com [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: compression stoc: none,zlib@openssh.com [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: languages ctos:  [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: languages stoc:  [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: first_kex_follows 0  [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: reserved 0  [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: peer client KEXINIT proposal [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: KEX algorithms: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,rsa2048-sha256,rsa1024-sha1,diffie-hellman-group1-sha1 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: host key algorithms: ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: ciphers ctos: aes256-ctr,aes256-cbc,rijndael-cbc@lysator.liu.se,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,chacha20-poly1305@openssh.com,blowfish-ctr,blowfish-cbc,3des-ctr,3des-cbc,arcfour256,arcfour128 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: ciphers stoc: aes256-ctr,aes256-cbc,rijndael-cbc@lysator.liu.se,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,chacha20-poly1305@openssh.com,blowfish-ctr,blowfish-cbc,3des-ctr,3des-cbc,arcfour256,arcfour128 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: MACs ctos: hmac-sha2-256,hmac-sha1,hmac-sha1-96,hmac-md5,hmac-sha2-256-etm@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-etm@openssh.com [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: MACs stoc: hmac-sha2-256,hmac-sha1,hmac-sha1-96,hmac-md5,hmac-sha2-256-etm@openssh.com,hmac-sha1-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-etm@openssh.com [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: compression ctos: none,zlib [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: compression stoc: none,zlib [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: languages ctos:  [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: languages stoc:  [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: first_kex_follows 0  [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: reserved 0  [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug1: kex: algorithm: curve25519-sha256@libssh.org [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug1: kex: host key algorithm: ssh-ed25519 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug1: kex: client->server cipher: aes256-ctr MAC: hmac-sha2-256 compression: none [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug1: kex: server->client cipher: aes256-ctr MAC: hmac-sha2-256 compression: none [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug1: kex: curve25519-sha256@libssh.org need=32 dh_need=32 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_request_send entering: type 120 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_request_receive_expect entering: type 121 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_request_receive entering [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_request_receive entering
Aug 31 11:18:37 localhost sshd[12797]: debug3: monitor_read: checking request 120
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_request_send entering: type 121
Aug 31 11:18:37 localhost sshd[12797]: debug1: kex: curve25519-sha256@libssh.org need=32 dh_need=32 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_request_send entering: type 120 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_request_receive_expect entering: type 121 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_request_receive entering [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_request_receive entering
Aug 31 11:18:37 localhost sshd[12797]: debug3: monitor_read: checking request 120
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_request_send entering: type 121
Aug 31 11:18:37 localhost sshd[12797]: debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: receive packet: type 30 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_key_sign entering [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_request_send entering: type 6 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_key_sign: waiting for MONITOR_ANS_SIGN [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_request_receive_expect entering: type 7 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_request_receive entering [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_request_receive entering
Aug 31 11:18:37 localhost sshd[12797]: debug3: monitor_read: checking request 6
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_answer_sign
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_answer_sign: hostkey proof signature 0x56295f286370(83)
Aug 31 11:18:37 localhost sshd[12797]: debug3: mm_request_send entering: type 7
Aug 31 11:18:37 localhost sshd[12797]: debug2: monitor_read: 6 used once, disabling now
Aug 31 11:18:37 localhost sshd[12410]: debug3: receive packet: type 98
Aug 31 11:18:37 localhost sshd[12410]: debug1: server_input_channel_req: channel 0 request winadj@putty.projects.tartarus.org reply 1
Aug 31 11:18:37 localhost sshd[12410]: debug1: session_by_channel: session 0 channel 0
Aug 31 11:18:37 localhost sshd[12410]: debug1: session_input_channel_req: session 0 req winadj@putty.projects.tartarus.org
Aug 31 11:18:37 localhost sshd[12410]: debug3: send packet: type 100
Aug 31 11:18:37 localhost sshd[12410]: debug2: channel 0: rcvd adjust 9713
Aug 31 11:18:37 localhost sshd[12797]: debug3: send packet: type 31 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: send packet: type 21 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: set_newkeys: mode 1 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug1: rekey after 4294967296 blocks [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug1: SSH2_MSG_NEWKEYS sent [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug1: expecting SSH2_MSG_NEWKEYS [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: receive packet: type 21 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug1: SSH2_MSG_NEWKEYS received [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug2: set_newkeys: mode 0 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug1: rekey after 4294967296 blocks [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug1: KEX done [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: receive packet: type 5 [preauth]
Aug 31 11:18:37 localhost sshd[12797]: debug3: send packet: type 6 [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug3: receive packet: type 50 [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug1: userauth-request for user root service ssh-connection method none [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug1: attempt 0 failures 0 [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_getpwnamallow entering [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_request_send entering: type 8 [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_getpwnamallow: waiting for MONITOR_ANS_PWNAM [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_request_receive_expect entering: type 9 [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_request_receive entering [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_request_receive entering
Aug 31 11:18:39 localhost sshd[12797]: debug3: monitor_read: checking request 8
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_answer_pwnamallow
Aug 31 11:18:39 localhost sshd[12797]: debug3: Trying to reverse map address 10.0.2.2.
Aug 31 11:18:39 localhost sshd[12797]: debug2: parse_server_config: config reprocess config len 734
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_answer_pwnamallow: sending MONITOR_ANS_PWNAM: 1
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_request_send entering: type 9
Aug 31 11:18:39 localhost sshd[12797]: debug2: monitor_read: 8 used once, disabling now
Aug 31 11:18:39 localhost sshd[12797]: debug2: input_userauth_request: setting up authctxt for root [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_start_pam entering [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_request_send entering: type 100 [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_inform_authserv entering [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_request_send entering: type 4 [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_inform_authrole entering [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_request_send entering: type 80 [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug2: input_userauth_request: try method none [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug3: userauth_finish: failure partial=0 next methods="password" [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug3: send packet: type 51 [preauth]
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_request_receive entering
Aug 31 11:18:39 localhost sshd[12797]: debug3: monitor_read: checking request 100
Aug 31 11:18:39 localhost sshd[12797]: debug1: PAM: initializing for "root"
Aug 31 11:18:39 localhost sshd[12797]: debug1: PAM: setting PAM_RHOST to "gateway"
Aug 31 11:18:39 localhost sshd[12797]: debug1: PAM: setting PAM_TTY to "ssh"
Aug 31 11:18:39 localhost sshd[12797]: debug2: monitor_read: 100 used once, disabling now
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_request_receive entering
Aug 31 11:18:39 localhost sshd[12797]: debug3: monitor_read: checking request 4
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_answer_authserv: service=ssh-connection, style=
Aug 31 11:18:39 localhost sshd[12797]: debug2: monitor_read: 4 used once, disabling now
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_request_receive entering
Aug 31 11:18:39 localhost sshd[12797]: debug3: monitor_read: checking request 80
Aug 31 11:18:39 localhost sshd[12797]: debug3: mm_answer_authrole: role=
Aug 31 11:18:39 localhost sshd[12797]: debug2: monitor_read: 80 used once, disabling now
Aug 31 11:18:39 localhost sshd[12410]: debug3: receive packet: type 98
Aug 31 11:18:39 localhost sshd[12410]: debug1: server_input_channel_req: channel 0 request winadj@putty.projects.tartarus.org reply 1
Aug 31 11:18:39 localhost sshd[12410]: debug1: session_by_channel: session 0 channel 0
Aug 31 11:18:39 localhost sshd[12410]: debug1: session_input_channel_req: session 0 req winadj@putty.projects.tartarus.org
Aug 31 11:18:39 localhost sshd[12410]: debug3: send packet: type 100
Aug 31 11:18:39 localhost sshd[12410]: debug2: channel 0: rcvd adjust 9040
Aug 31 11:18:42 localhost sshd[12797]: debug3: receive packet: type 50 [preauth]
Aug 31 11:18:42 localhost sshd[12797]: debug1: userauth-request for user root service ssh-connection method password [preauth]
Aug 31 11:18:42 localhost sshd[12797]: debug1: attempt 1 failures 0 [preauth]
Aug 31 11:18:42 localhost sshd[12797]: debug2: input_userauth_request: try method password [preauth]
Aug 31 11:18:42 localhost sshd[12797]: debug3: mm_auth_password entering [preauth]
Aug 31 11:18:42 localhost sshd[12797]: debug3: mm_request_send entering: type 12 [preauth]
Aug 31 11:18:42 localhost sshd[12797]: debug3: mm_auth_password: waiting for MONITOR_ANS_AUTHPASSWORD [preauth]
Aug 31 11:18:42 localhost sshd[12797]: debug3: mm_request_receive_expect entering: type 13 [preauth]
Aug 31 11:18:42 localhost sshd[12797]: debug3: mm_request_receive entering [preauth]
Aug 31 11:18:42 localhost sshd[12797]: debug3: mm_request_receive entering
Aug 31 11:18:42 localhost sshd[12797]: debug3: monitor_read: checking request 12
Aug 31 11:18:42 localhost sshd[12797]: debug3: PAM: sshpam_passwd_conv called with 1 messages
Aug 31 11:19:07 localhost sshd[12797]: debug1: PAM: password authentication accepted for root
Aug 31 11:19:07 localhost sshd[12797]: debug3: mm_answer_authpassword: sending result 1
Aug 31 11:19:07 localhost sshd[12797]: debug3: mm_request_send entering: type 13
Aug 31 11:19:07 localhost sshd[12797]: debug3: mm_request_receive_expect entering: type 102
Aug 31 11:19:07 localhost sshd[12797]: debug3: mm_request_receive entering
Aug 31 11:19:07 localhost sshd[12797]: debug1: do_pam_account: called
Aug 31 11:19:27 localhost sshd[12797]: debug3: PAM: do_pam_account pam_acct_mgmt = 0 (Success)
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_request_send entering: type 103
Aug 31 11:19:27 localhost sshd[12797]: Accepted password for root from 10.0.2.2 port 60881 ssh2
Aug 31 11:19:27 localhost sshd[12797]: debug1: monitor_child_preauth: root has been authenticated by privileged process
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_get_keystate: Waiting for new keys
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_request_receive_expect entering: type 26
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_request_receive entering
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_get_keystate: GOT new keys
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_request_receive_expect entering: type 122
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_request_receive entering
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_request_send entering: type 123
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_auth_password: user authenticated [preauth]
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_do_pam_account entering [preauth]
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_request_send entering: type 102 [preauth]
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_request_receive_expect entering: type 103 [preauth]
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_request_receive entering [preauth]
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_do_pam_account returning 1 [preauth]
Aug 31 11:19:27 localhost sshd[12797]: debug3: send packet: type 52 [preauth]
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_request_send entering: type 26 [preauth]
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_send_keystate: Finished sending state [preauth]
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_request_send entering: type 122 [preauth]
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_request_receive_expect entering: type 123 [preauth]
Aug 31 11:19:27 localhost sshd[12797]: debug3: mm_request_receive entering [preauth]
Aug 31 11:19:27 localhost sshd[12797]: debug1: monitor_read_log: child log fd closed
Aug 31 11:19:27 localhost sshd[12797]: debug3: ssh_sandbox_parent_finish: finished
Aug 31 11:19:27 localhost sshd[12797]: debug1: SELinux support disabled
Aug 31 11:19:27 localhost sshd[12797]: debug1: PAM: establishing credentials
Aug 31 11:19:47 localhost sshd[12797]: debug3: PAM: opening session
Aug 31 11:19:47 localhost sshd[12797]: pam_unix(sshd:session): session opened for user root by (uid=0)
Aug 31 11:19:47 localhost sshd[12797]: debug3: PAM: sshpam_store_conv called with 1 messages
Aug 31 11:19:47 localhost sshd[12797]: debug3: PAM: sshpam_store_conv called with 1 messages
Aug 31 11:20:07 localhost sshd[12797]: debug3: monitor_apply_keystate: packet_set_state
Aug 31 11:20:07 localhost sshd[12797]: debug2: set_newkeys: mode 0
Aug 31 11:20:07 localhost sshd[12797]: debug1: rekey after 4294967296 blocks
Aug 31 11:20:07 localhost sshd[12797]: debug2: set_newkeys: mode 1
Aug 31 11:20:07 localhost sshd[12797]: debug1: rekey after 4294967296 blocks
Aug 31 11:20:07 localhost sshd[12797]: debug1: ssh_packet_set_postauth: called
Aug 31 11:20:07 localhost sshd[12797]: debug3: ssh_packet_set_state: done
Aug 31 11:20:07 localhost sshd[12797]: debug3: notify_hostkeys: key 0: ssh-rsa SHA256:dmG1Rqe9ziy80nGAtd3SoA92hDfuR3pN8LP9Lc+w/e4
Aug 31 11:20:07 localhost sshd[12797]: debug3: notify_hostkeys: key 1: ecdsa-sha2-nistp256 SHA256:TSyfUSxxZALsciSyukejdC8DVSphrIY40xdc+GecSbc
Aug 31 11:20:07 localhost sshd[12797]: debug3: notify_hostkeys: key 2: ssh-ed25519 SHA256:6wysBMetfwupRFwhqe1jhtWTvo6p0Uu8ghwx2tHIKuA
Aug 31 11:20:07 localhost sshd[12797]: debug3: notify_hostkeys: sent 3 hostkeys
Aug 31 11:20:07 localhost sshd[12797]: debug3: send packet: type 80
Aug 31 11:20:07 localhost sshd[12797]: debug1: Entering interactive session for SSH2.
Aug 31 11:20:07 localhost sshd[12797]: debug2: fd 4 setting O_NONBLOCK
Aug 31 11:20:07 localhost sshd[12797]: debug2: fd 5 setting O_NONBLOCK
Aug 31 11:20:07 localhost sshd[12797]: debug1: server_init_dispatch
Aug 31 11:20:07 localhost sshd[12797]: debug3: receive packet: type 2
Aug 31 11:20:07 localhost sshd[12797]: debug3: Received SSH2_MSG_IGNORE
Aug 31 11:20:07 localhost sshd[12797]: debug3: receive packet: type 90
Aug 31 11:20:07 localhost sshd[12797]: debug1: server_input_channel_open: ctype session rchan 256 win 16384 max 16384
Aug 31 11:20:07 localhost sshd[12797]: debug1: input_session_request
Aug 31 11:20:07 localhost sshd[12797]: debug1: channel 0: new [server-session]
Aug 31 11:20:07 localhost sshd[12797]: debug2: session_new: allocate (allocated 0 max 10)
Aug 31 11:20:07 localhost sshd[12797]: debug3: session_unused: session id 0 unused
Aug 31 11:20:07 localhost sshd[12797]: debug1: session_new: session 0
Aug 31 11:20:07 localhost sshd[12797]: debug1: session_open: channel 0
Aug 31 11:20:07 localhost sshd[12797]: debug1: session_open: session 0: link with channel 0
Aug 31 11:20:07 localhost sshd[12797]: debug1: server_input_channel_open: confirm session
Aug 31 11:20:07 localhost sshd[12797]: debug3: send packet: type 91
Aug 31 11:20:07 localhost sshd[12797]: debug3: receive packet: type 98
Aug 31 11:20:07 localhost sshd[12797]: debug1: server_input_channel_req: channel 0 request pty-req reply 1
Aug 31 11:20:07 localhost sshd[12797]: debug1: session_by_channel: session 0 channel 0
Aug 31 11:20:07 localhost sshd[12797]: debug1: session_input_channel_req: session 0 req pty-req
Aug 31 11:20:07 localhost sshd[12797]: debug1: Allocating pty.
Aug 31 11:20:07 localhost sshd[12797]: debug1: session_pty_req: session 0 alloc /dev/pts/2
Aug 31 11:20:07 localhost sshd[12797]: debug1: SELinux support disabled
Aug 31 11:20:07 localhost sshd[12797]: debug3: send packet: type 99
Aug 31 11:20:07 localhost sshd[12797]: debug3: receive packet: type 98
Aug 31 11:20:07 localhost sshd[12797]: debug1: server_input_channel_req: channel 0 request shell reply 1
Aug 31 11:20:07 localhost sshd[12797]: debug1: session_by_channel: session 0 channel 0
Aug 31 11:20:07 localhost sshd[12797]: debug1: session_input_channel_req: session 0 req shell
Aug 31 11:20:07 localhost sshd[12797]: Starting session: shell on pts/2 for root from 10.0.2.2 port 60881 id 0
Aug 31 11:20:07 localhost sshd[12797]: debug2: fd 3 setting TCP_NODELAY
Aug 31 11:20:07 localhost sshd[12797]: debug3: ssh_packet_set_tos: set IP_TOS 0x10
Aug 31 11:20:07 localhost sshd[12797]: debug2: channel 0: rfd 11 isatty
Aug 31 11:20:07 localhost sshd[12797]: debug2: fd 11 setting O_NONBLOCK
Aug 31 11:20:07 localhost sshd[12797]: debug3: fd 7 is O_NONBLOCK
Aug 31 11:20:07 localhost sshd[12797]: debug3: send packet: type 99
Aug 31 11:20:07 localhost sshd[12829]: debug1: Setting controlling tty using TIOCSCTTY.
Aug 31 11:20:07 localhost sshd[12410]: debug3: receive packet: type 98
Aug 31 11:20:07 localhost sshd[12410]: debug1: server_input_channel_req: channel 0 request winadj@putty.projects.tartarus.org reply 1
Aug 31 11:20:07 localhost sshd[12410]: debug1: session_by_channel: session 0 channel 0
Aug 31 11:20:07 localhost sshd[12410]: debug1: session_input_channel_req: session 0 req winadj@putty.projects.tartarus.org
Aug 31 11:20:07 localhost sshd[12410]: debug3: send packet: type 100
Aug 31 11:20:07 localhost sshd[12410]: debug2: channel 0: rcvd adjust 8983
Aug 31 11:20:47 localhost sshd[12829]: debug1: PAM: reinitializing credentials
Aug 31 11:21:07 localhost sshd[12829]: debug1: permanently_set_uid: 0/0
Aug 31 11:21:07 localhost sshd[12829]: debug3: Copy environment: XDG_SESSION_ID=7
Aug 31 11:21:07 localhost sshd[12829]: debug3: Copy environment: XDG_RUNTIME_DIR=/run/user/0

★★★★★

/etc/ssh/sshd_config

HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
SyslogFacility AUTHPRIV
LogLevel DEBUG3
PubkeyAuthentication no
AuthorizedKeysFile      .ssh/authorized_keys
PasswordAuthentication yes
ChallengeResponseAuthentication no
GSSAPIAuthentication no
GSSAPICleanupCredentials no
UsePAM yes
X11Forwarding yes
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
Subsystem       sftp    /usr/libexec/openssh/sftp-server
dada ★★★★★
() автор топика
Ответ на: комментарий от ukr_unix_user

Спасибо.
он по дефолту закоменчен и со значением YES.
Плохая привычка смотреть в конф-файлы греп-ом.

dada ★★★★★
() автор топика
Ответ на: комментарий от anc

Ситуация: недавно стало так, что если я долго (! буквально минуты полторы) ничего через консоль, подключенную по ссх, не делаю, то оно тупо виснет в хлам и не отвечет, не печатаются символы и все такое. Помогает только переконнектится. Та же шляпа если сделать подключение через ФМ — при попытке обновить список в открытой директории оно тупо бесконечно крутит картинку лоадера.

Могу я грешить на позортелеком?

deep-purple ★★★★★
()
Ответ на: комментарий от deep-purple

Ну это вроде для отдельной темы. А так, раз всего полторы минуты смотрите tcpdump.

anc ★★★★★
()
Ответ на: комментарий от deep-purple

Кстати напомнили. Весьма давно, была подобная мистическая ситуация, только не через полторы минуты, а емнип где-то мин через 5-30 (рандомно) инактива в ssh и только для варианта подключения к удаленным сервакам (с локальными все работало). Появилось внезапно и только на одной машинке, за период существования проблемы не поменялся только кабель идущий от мелкого свича в кабинете до машинки. Т.е. и роутер менялся и кабели до кабинета («спасибо» пожару, проводка в коридоре вся сгорела) и свич меняли. Сама проблема не сильно уж и парила, редко нужно было.
Что стало решением не знаю. Два момента которые произошли, это замена(точнее установка) новой сетевки вместо встроенной и переезд в другое место. По времени это было разнесено, но когда заработало не скажу.
Итого это либо сетевка фигней страдала или все-таки кабель по кабинету. Больше тут вариантов не вижу.

anc ★★★★★
()
Ответ на: комментарий от anc

Две машинки с которых я хожу — стационарник и лаптоп (лежа иногда поработать). Один по проводу, второй вифи. Потоковые аудио-видео через тот же инет и роутер легко, сутками и без проблем, а ссх на удаленку вот такой финт начало делать, ну с месяц.

deep-purple ★★★★★
()
Ответ на: комментарий от deep-purple

Ну если это разные, то как написал выше, посмотрите сначала на tcpdump.

anc ★★★★★
()
Ответ на: комментарий от deep-purple

ЗЫ Потоковые аудио-видео это udp для которых потеря не проблема. ssh это tcp, конкретное соединение. Тут много может быть нюансов, может и роутер фигней страдает. Кстати если с него заходить так же соединение рвется?

anc ★★★★★
()
Ответ на: комментарий от anc

Потоковое tcp тоже есть, в первую очередь радио. Ну оно и понятно — я ж писал что соединение «замерзает» только когда через него ничего не передается (по крайней мере с моей стороны).

Да, запробую с роутера. И запробую htop запустить и выждать.

deep-purple ★★★★★
()
Ответ на: комментарий от deep-purple

Создайте все-таки отдельную тему, со ссылкой на ваш первый пост. А то сюда никто не прийдет тем более она отмечена как решенная :)

anc ★★★★★
()
Ответ на: комментарий от deep-purple

man sshd_config:
ClientAliveInterval
Sets a timeout interval in seconds after which if no data has been received from the client, sshd(8) will send
a message through the encrypted channel to request a response from the client. The default is 0, indicating
that these messages will not be sent to the client.

Ещё, как вариант, соединение может рваться со стороны фаерволла где-либо на пути.

Если tmux (он всё время что-нибудь туда сюда гоняет) запускать, то соединение живёт?

Ivan_qrt ★★★★★
()
Ответ на: комментарий от Ivan_qrt

Ещё, как вариант, соединение может рваться со стороны фаерволла где-либо на пути.

Это простите как? Кто-то прислал принудительно rst ?

anc ★★★★★
()
Ответ на: комментарий от anc

Это простите как? Кто-то прислал принудительно rst ?

established, related соединения могут закрываться по таймауту, если в них не было активности. Я с такими настройками фаерволов сталкивался.

Ivan_qrt ★★★★★
()

пока лог скроллил устал.

burato ★★★★★
()
Ответ на: комментарий от Ivan_qrt

Ну вот, «по пути»: 1. это «домашний» роутер, 2. если серый адрес то роутер прова. На этом все. Обычно формулировку «по пути» используют для всего инета.

anc ★★★★★
()
Ответ на: комментарий от anc

если серый адрес то роутер прова. На этом все.

Ну ещё может быть шлюз в конторе, где находится сервак. IP у него, при этом может быть белым. Но он будет за фаерволлом (и контраком).

Ivan_qrt ★★★★★
()
Ответ на: комментарий от deep-purple

Это твое тср соединение где-то проходит через нат. роутер, который нат выполняет очищает коннтрак запись по неактивности. ... связь пропадает.

anto215 ★★
()
Ответ на: комментарий от deep-purple

и что? трафик через роутер растет и одмин роутера уменьшил таймаут очистки коннтрак записей по неактивности. иначе коннтрак таблица вырастает до огромных значений.

anto215 ★★
()
23 мая 2020 г.
Ответ на: комментарий от aquadon

Через mosh пробовал?

на дату треда посмотри

Tanger ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.