winfsp / sshfs-win

SSHFS For Windows
https://winfsp.dev
Other
5.14k stars 260 forks source link

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

Open Javekson opened 5 months ago

Javekson commented 5 months 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).

felipecrs commented 2 months ago

It's funny it even works for you. SSHFS-Win was never able to detect hosts from my config file even though ssh on powershell does normally. After reading your issue, I removed the comments in my config file, but unfortunately nothing changed.