Skip to content

SSHFS-Win fails to read private key when file is CRLF encoded #471

Description

@Hedrauta

SSHFS-Win fails to recognize a private key when the key file is stored with CRLF (Windows) line endings instead of LF.
The key is valid and works correctly with OpenSSH on the same system.
With CRLF line endings, SSHFS-Win reports that the key is invalid or cannot be parsed.
This behavior is unexpected on Windows, where CRLF is the default line ending.

Steps to Reproduce

Create or edit a private key file using CRLF line endings
Use the key with SSHFS-Win
Observe that the key is not recognized / parsing fails
Convert the same key file to LF line endings
Retry → key works as expected

Expected Behavior

SSHFS-Win should correctly parse private keys regardless of CRLF or LF line endings.

Environment

OS: Windows 10 / Windows 11
SSHFS-Win: current release
Key type: ed25519
Shell: PowerShell / CMD

Additional Notes

This issue is not documented and can easily occur because most Windows editors default to CRLF.
Improving CRLF tolerance would prevent hard-to-diagnose authentication failures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions