Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Guest

Windows SSH can see this with permission issues:
https://github.com/PowerShell/Win32-OpenSSH/issues/1302
Well I eventually found out that there was a permission issue - still could be handled more gracefully by openssh

https://github.com/PowerShell/Win32-OpenSSH/issues/1302#issuecomment-446991503
* 2018-12-03 22:21:10.689 Bad message (badly formatted packet or protocol incompatibility).
* 2018-12-03 22:21:10.689 Error code: 5
* 2018-12-03 22:21:10.689 Error message from server: Bad message"

Kind of makes sense as you're trying to browse folders and perm problems are ones people will be likely to run into. Although "packet" is not a great error to return to a user as its a networking term and in use during SSH.

But, you should in some way check or reset SSH perm and of all files. If it's out of whack when using SSH then you will be guaranteed to see problems. May need to check file owner too. May need to adjust SSH user use. Or whatever.

Perhaps it can also be something else.
chris.ayers@abmauri.com

UPDATE

I tried another SFTP client (btw there are some really bad SFTP tools out there!!) and the error remains, so I can confidently say that the issue is not WinSCP

Thank you for your swift assistance – I will raise a call with Microsoft.

If you are happy to leave this call open I will paste the MS response here for the community FYI.
chris.ayers@abmauri.com

thanks

thanks for confirming its not WinSCP

The OpenSSH logs don't reveal too much, even when the system is put into verbose mode.

Permissions should not be an issue as the files are a clone of a Windows 10 system where the same user has no issues accessing the folders.

I will try and find another SFTP tool, but meantime does anyone else have any thought on the how I can get better (any) logs from Windows 11?
martin

Re: WinSCP on Windows 11 with OpenSSH gives "Bad message (badly formatted packet or protocol incompatibi

I do not see anything wrong about the message/request sent by WinSCP to the server.
I do not think this is about configuration of WinSCP (or WinSCP at all).
Can you access the folders with any other SFTP client?
I'd check permissions of the folder. And also maybe event logs on the server.
chris.ayers@abmauri.com

WinSCP on Windows 11 with OpenSSH gives "Bad message (badly formatted packet or protocol incompatibi

Hello,

I have a Windows Server in Azure that I've upgraded to Windows 11, installing the latest OpenSSH distribution. When I connect to the server, I get consistent errors Bad message (badly formatted packet or protocol incompatibility) when browsing some folders.

It's not all folders but its consistent. There does not seem to be any pattern in the errors - large directories, or small directories - the issue seems to be everywhere, but not all folders. After the error WinSCP continues but the folder is empty. If I browse to the disk (using RDP to log-in to the server I can see the folders with no problem.

The SSH config file is a copy of the one that worked fine in Windows 10, and the data disk being browsed is a clone of the data disk in Windows 10, where there is no issue.

I have taken a log of the issue – attached.

I'm using port 4022 on the server and have configured Windows Firewall to allow the connection.

Is there some specific settings for OpenSSH that I need to use in the SSHD_Config file for Windows 11. I've tried multiple WinSCP settings (timeouts, character sets) but no difference. I tried downgrading WinSCP but no difference. Now i'm at 6.5.5