- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 941
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
The server response does not contain an SSH identification string. #1107
Comments
I've reproduced this problem here: @Rob-Hague do you have any idea what might have happened? |
In #1250 it looks like the same as #1220 (comment) I had guessed that that was related to the connections being re-established too quickly. I started looking at SO_REUSEADDR and SO_REUSEPORT, but I have quite a lot of learning to do there. I'm not sure whether @rkreisel's problem would have the same cause or whether it is something different. Probably the best thing would be to get a packet capture by running |
FWIW I've been troubleshooting a similar problem, i.e. works without issues locally, and failed intermittently in Azure. The problem was that Azure Functions or App Services (except ASE/Isolated tier, that cost an arm and a leg) have a list of outbound IP addresses it can "pick" for outbound connections. Because the issue was intermittent and similar tickets pointed to SSH.NET potentially not handling connections properly(?), I initially looked into the SSH.NET code but after debugging it extensively I came to the conclusion it had nothing to do with it, then I started to look at the network (should have started there). This was manifesting itself by a FIN/ACK packet sent - by the remote site - immediately after the TCP handshake. You can run a packet capture from Azure by upgrading to a premium plan temporarily (if running on a consumption plan).
A few options to solve this particular problem are:
|
No.7906 in your trace seems strange to me, the Ack number from the server is 100 less than it should be, i.e. it is 969_232_960 but I would have thought it should be 969_233_060. No idea how that could happen |
When testing from a developer machine, the connection to the remote server is successful. But when deployed to an Azure function I get this error upon executing the Connect() method. The referenced ietf document is "greek" to me.
Renci.SshNet.Common.SshConnectionException: The server response does not contain an SSH identification string. The connection to the remote server was closed before any data was received. More information on the Protocol Version Exchange is available here: https://tools.ietf.org/html/rfc4253#section-4.2
The text was updated successfully, but these errors were encountered: