SFTP protocol violation: Invalid message number

Advertisement

bkskidmore@chattanooga.gov
Joined:
Posts:
1

SFTP protocol violation: Invalid message number

I just upgraded to WinSCP 6.1 and now I'm getting the following error for a couple of my SFTP sites.
SFTP protocol violation: Invalid message number
Is there something I can do to fix this problem. As information, I've connected to the problematic sites with another program successfully.

Thank you

Reply with quote

Advertisement

ssstevens@aurorak12.org
Joined:
Posts:
4
Location:
Colorado

Also getting 'SFTP protocol violation: Invalid message number' error after upgrading to 6.1

I am also getting the same error message when connecting to one server. This started right after upgrading to 6.1
I tried changing the Preferred SFTP protocol version to 5, as suggested, but still got the error.
Log file is attached.

If I use FileZilla, I am able to connect successfully – but I would rather use WinSCP.
Are there other workarounds available?
Thanks
  • OIC-SFTP-Server.log (20.18 KB, Private file)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
39,423
Location:
Prague, Czechia

Re: Also getting 'SFTP protocol violation: Invalid message number' error after upgrading to 6.1

Thanks both. Can you please post session log file on Debug 2 level? A log file from a working session from an older version of WinSCP might be useful too.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
39,423
Location:
Prague, Czechia

Re: Also getting 'SFTP protocol violation: Invalid message number' error after upgrading to 6.1

Thanks. Imo, it's clearly a bug on the server side. The server "supports" vendor-id SFTP extension. It first sends its own nonsense vendor information:
. Server software: ${pom.artifactId} ${pom.version} (0) by ${pom.groupId}
And when WinSCP sends its own vendor information (that's new in WinSCP 6.1), the server just fails totally.

For a start, can you try decreasing SFTP version to 3 (or even lower)? It might prevent the server from sending its vendor information, what would in turn prevent WinSCP from sending its.
https://winscp.net/eng/docs/ui_login_sftp

If you have means for contacting the server vendor, please report the problem to them.

Reply with quote

martin
Site Admin
martin avatar

Re: Also getting 'SFTP protocol violation: Invalid message number' error after upgrading to 6.1

Let us know what their response was.

Reply with quote

Advertisement

EDISean
Joined:
Posts:
4
Location:
Germany

I have the same issue, but your solutions didn't work :-(

Hi,

I also get the message:
SFTP protocol violation: Invalid message number 8 (expected 200).
The numbers change, but the message stays the same.
I can't change anything on the server side because "Everything is fine with our server. It must be a problem with your client"...
FileZilla works fine, but we need a way to have the transfer scripted because of reasons ;-)

I've attached the log of a failed attempt.
Maybe someone can see what the issue is?
I've tried reducing the SFTP-version but the error stays the same (if I go down to 2, I get the messsage that I should use 3,4,5 or 6).
  • Unified-Post-Prod.log (19.87 KB, Private file)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
39,423
Location:
Prague, Czechia

Re: I have the same issue, but your solutions didn't work :-(

Thanks for the log.
The server supports vendor-id SFTP extension. So WinSCP uses the extension to provide the server with its information using SSH_FXP_EXTENDED request (with "sequence number" 200). To this, the server should respond with SSH_FXP_EXTENDED_REPLY response with the same sequence number. (Or with an error using SSH_FXP_STATUS response, though that is not expected in this case). Instead, the server "responds" with SSH_FXP_EXTENDED message with sequence number 8. This is totally wrong:
  • SSH_FXP_EXTENDED is not a valid response to SSH_FXP_EXTENDED request.
  • SSH_FXP_EXTENDED is a request message. It can only ever be sent by the client, never by the server.
  • The "response" uses wrong sequence number. In that session, WinSCP didn't sent any request with sequence number 8.
It's irrelevant that FileZilla "works", as FileZilla does not support the vendor-id extension. So it does not trigger the bug in the server.

Reply with quote

EDISean
Joined:
Posts:
4
Location:
Germany

Erm...

Hi, thanks for the quick analysis.

Is there anything I can do on my side to get it to work?
Or does the Server-side need to change something?

Thanks again for the quick reply.

Reply with quote

Advertisement

EDISean
Joined:
Posts:
4
Location:
Germany

It worked

Hi,

I've already answered via email, but just to let every other person with the same problem know: IT WORKED!!!

Is there a timeline when (or if) it will be implemented in the release-version of WinSCP?

Reply with quote

Advertisement

You can post new topics in this forum