Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential Fixes for "Network Name cannot be found" with sshfs.k #444

Open
CaptainXLAB opened this issue Oct 14, 2024 · 1 comment
Open

Comments

@CaptainXLAB
Copy link

Not a problem/issue, but findings on how I resolved my own issues when trying to connect to a sever with sshfs.kr.

For any Windows versions that have OpenSSH included, make sure you use the latest pre-release!

  • OpenSSH included with Windows is seemingly not compatible with SSHS-Win

If \\sshfs.kr and \\sshfs.k\ don't work, try connecting with \\sshfs\ first and see if it prompts for a password (connection test)

When using \\sshfs.k with one key file

  • Try connecting with ssh first, without sshfs. Look for any warnings, connection failure(s), etc.
  • Make sure you have the correct permissions set on %userprofile%\.ssh\id_rsa. Any warning(s) will show up when trying to connect with plain ssh.
  • Only these 3 users are required in permissions:
    • administrators
    • Your current user
    • SYSTEM
  • Ensure Winfsp.Launcher service is running using services.msc, start if it has stopped

For \\sshfs.k with different key files based on domain

  • Open C:\Program Files\SSHFS-Win\etc\ssh_config file
  • Add entries to that file based on this pattern below:
Host pixel.phone
    User root
    IdentityFile C:\Users\User\.ssh\id_rsa_pixel_root
    userknownhostsfile C:\Users\User\.ssh\known_hosts

Host 100.123.45.67
    User test
    IdentityFile C:\Users\User\.ssh\testserver_key
    userknownhostsfile C:\Users\User\.ssh\known_hosts

I had to do all this to make sshfs.kr work with Windows 11 connecting with sshfs.kr

  • Fix bad permissions on key file
  • Add entry to ssh_config file
  • Install latest pre-release version

Hope this helps if you're stuck seeing Network name cannot be found when using sshfs.kr

@mkguru77
Copy link

mkguru77 commented Dec 26, 2024

Thank you for this.

I wanted to add my local network folder (from rpi) to windows explorer using ssh key. It took only couple of mins in my linux desktop. But in windows 11, after couple of hours of trying different things only this works for me. This is what I did:

  • This is simply due to the issue that it cannot look into the files in the default location of ~/.ssh. I added the server info from the config file to a new file in the path C:\Program Files\SSHFS-Win\etc\ssh_config. It looks like below:
Host myhostname
Hostname 192.168.1.34
User myuser
IdentityFile ~/.ssh/id_rsa
  • In Map network drive, I used \\sshfs.kr\myhostname. This connects to root folder. You can add any specific folder path as well after the hostname.
    Note: Keyfile name has to be id_rsa and id_rsa.pub but content can be any format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants