-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Underlying SSH2 implementation in netopeer2-server does not support SSH_MSG_GLOBAL_REQUEST according to the SSH standard #563
Comments
Hi Patrik, Regards, |
Hi Michal, |
Hi,
Well, the only other solution would be to add the required functions into libssh ourselves and we are simply not able to do that now. What else would you expect? Also, the same problem is in OpenSSL where the heartbeat functionality is actually disabled on purpose. Also note that the standard does not strictly require the server to send the keepalives, so the clients should be aware of that. We are sending TCP keep-alives, it is the best we can do. Regards, |
I think there is a bit of a misunderstanding here. Even if sending keep-alives is optional, it is not optional to support SSH_MSG_GLOBAL_REQUEST. So a client sending periodical SSH_MSG_GLOBAL_REQUESTs should be considered safe, as the server must reply with SSH_MSG_REQUEST_FAILURE, should the request not be supported, which is in itself a sufficient reply. Now, I only use netopeer2-server for verifiation and because I think this is generally a good product and convenient to start up on a virtual machine. The netconf servers I normally target in production is OpenSSH and dropbear. I wrote this just to inform you that you was not compliant on SSH, as I thought you wanted to know this. Anyway, do with this information as you want. |
Hi Patrik, Okay, so I have tested it with the current netopeer2-server and libnetconf2 with libssh 0.8.7, this is the server output
and this the
so I would say it works fine, right? Regards, |
Hi, As for the "problem": I am initiating the connection from my end, but I still want the connection to be persistent. In case of restarts, link breaks and other disturbances I need to reinitiate the connection, thus I need fast feedback on when the connection goes down. The default is based on a number of things, such as socket implementions and such, so I need to send keep-alives to make the feedback deterministic. |
Hi,
When trying to use SSH keep-alive on the netopeer2-server, the server replies with SSH2_MSG_UNIMPLEMENTED.
The keep-alive message is normally sent as a SSH_MSG_GLOBAL_REQUEST according to RFC 4254 sect. 4, https://tools.ietf.org/html/rfc4254#section-4 .
According to the RFC, global messages must be replied in case want-reply is set to "true", as stated below:
To reproduce the bug, please connect to the server with the following command,
You will then see the following,
Netopeer server version:
netopeer2-server 0.7.12
Protocol version and server version according to OpenSSH:
debug1: Remote protocol version 2.0, remote software version libssh_0.7.5
BR
Patrik
The text was updated successfully, but these errors were encountered: