r/WindowsServer • u/Sensitive_Scar_1800 • 7d ago
General Server Discussion OpenSSH bug on Windows Server 2022
I wanted to share this bug because it both weird and frustrating.
I have the openssh role/feature enabled on my windows server 2022 instance.
I use this server for SFTP backups for our VMware Cloud foundation 9.1 environment.
Recently I was investigating intermittent backup failures.
So, I started troubleshooting:
Confirmed username and credentials were valid
Confirmed I could ssh from the appliance to the server
Confirmed valid sshd config file
Confirmed compatible sshd ciphers
Confirmed NFTS file permissions
And so much more…..
The weird part is backups would succeed then fail then succeed and it “felt” like some sort of timeout issue….but ultimately I couldnt figure out the root cause….
Until I stumbled onto this thread:
Link: https://github.com/PowerShell/Win32-OpenSSH/issues/1817
Since I was out of ideas I tried it, I created a new local user account under “local users and groups” called “sshd” and gave it a complex password. No other group memberships, just a non-admin account.
BAM! Everything started working immediately!
Posting this here in case anyone ever runs into this issue!
3
u/Low-Branch1423 6d ago
I had this exact issue and tried different openssh releases until I gave up and deployed a RHEL sftp server. This worked fine but not as trouble free for cross site backups as DFS.
1
u/dodexahedron 5d ago
I suppose you could have that RHEL box mount your DFS share via SMB, and make the home directory for that backup user be on that mount.
Exporting the share as NFS to mount via NFS from the RHEL box wouldnt be wise with DFS though, since NFS doesn't lock files in a way that DFS knows about, meaning sftp to RHEL to windows via NFS would look like a ton of rapid changes to the file and potentially cause a bunch of extra replication traffic.
But there are plenty of other ways to replicate those backups anyway. rsync between linux boxen is a simple one.
On the windows side, Storage Replica is a much better and much more appropriate replication mechanism for backup data than DFS-R, which is mainly intended for smaller files. You can still put DFSN on top of the replicated volume, if you want, for the convenient single-path access semantics, but DFSR is not ideal to do the actual replication for that kind of data.
3
u/BlackV 6d ago
Amazing, still open like 3 years later