winfsp / sshfs-win

SSHFS For Windows
https://winfsp.dev
Other
4.78k stars 250 forks source link

SSHFS-Win does not work correctly with comments in the ssh-config file (Windows 11) #431

Open Javekson opened 1 month ago

Javekson commented 1 month ago

I am having an issue using SSHFS-Win Manager to connect to a virtual machine. It appears that the issue is related to the presence of comments starting with # in the SSH configuration file (C:\Users\Javekson\.ssh\config).

Steps to reproduce:

Install and configure SSHFS-Win Manager. Create an SSH configuration file (C:\Users\Javekson\.ssh\config) with the following content:

Host myvm
  HostName 192.168.1.100
  User javekson
  IdentityFile C:\Users\Javekson\.ssh\id_rsa

# This comment causes the issue
# Comment out this line to resolve the issue
# Example comment

Run SSHFS-Win Manager and try to connect to the virtual machine.

Expected behavior: SSHFS-Win Manager should successfully connect to the virtual machine and mount a drive.

Actual behavior: SSHFS-Win Manager fails to connect to the virtual machine and does not mount a drive.

Temporary workaround: Remove all comments from the SSH configuration file (C:\Users\Javekson\.ssh\config).