Skip to content

[feature] respond to server check alive requests #709

Closed
@abdeldjalil-fellah

Description

@abdeldjalil-fellah

when the ssh server is configured to check clients alive status with:
ClientAliveCountMax 2
ClientAliveInterval 5

the client should reply to the server requests to prevent the server from terminating the session but it does not as you can see in this server log:

 Jul 23 11:24:09 localhost sshd[5270]: debug3: send packet: type 81 [SSH_MSG_REQUEST_SUCCESS]
 Jul 23 11:24:09 localhost sshd[5270]: debug3: send packet: type 80 [SSH_MSG_GLOBAL_REQUEST]
 Jul 23 11:24:14 localhost sshd[5270]: debug3: send packet: type 80 [SSH_MSG_GLOBAL_REQUEST]
 Jul 23 11:24:19 localhost sshd[5270]: Timeout, client not responding from user user1 192.168.43.253 port 51236

with putty the server logs:

 Jul 23 11:44:20 localhost sshd[5364]: debug3: send packet: type 99 [SSH_MSG_CHANNEL_SUCCESS]
 Jul 23 11:44:20 localhost sshd[5360]: debug3: mm_request_receive entering
 Jul 23 11:44:20 localhost sshd[5360]: debug3: monitor_read: checking request 124
 Jul 23 11:44:25 localhost sshd[5364]: debug2: channel 2: request keepalive@openssh.com confirm 1
 Jul 23 11:44:25 localhost sshd[5364]: debug3: send packet: type 98 [SSH_MSG_CHANNEL_REQUEST]
 Jul 23 11:44:25 localhost sshd[5364]: debug3: receive packet: type 100 [SSH_MSG_CHANNEL_FAILURE]
 Jul 23 11:44:25 localhost sshd[5364]: debug1: Got 100/12 for keepalive
 Jul 23 11:44:30 localhost sshd[5364]: debug2: channel 2: request keepalive@openssh.com confirm 1
 Jul 23 11:44:30 localhost sshd[5364]: debug3: send packet: type 98 [SSH_MSG_CHANNEL_REQUEST]
 Jul 23 11:44:30 localhost sshd[5364]: debug3: receive packet: type 100 [SSH_MSG_CHANNEL_FAILURE]
 Jul 23 11:44:30 localhost sshd[5364]: debug1: Got 100/13 for keepalive

PS: does the client respond to tcp_keepalive messages (TCPKeepAlive yes)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions