Read and write files to a Windows machine from Fedora 41

I am working on a Fedora 41 machine. If I open the file browser and in the address bar type sftp://some_user@some_linux_PC it asks for some_user’s password and after that I can read and write files in the other Linux PC. I want to do the same but where the remote PC has Windows 11. Is this possible? How?

This is the folder to access to, i.e. my home directory in Windows:

I have enabled sharing for this folder:

and I have also enabled network discovery and file sharing:

Now in Fedora I am doing this:

I don’t understand what to put in “Domain”, SAMBA is the default value. If I enter my credentials there and click “connect” it just does something for a few seconds and then pops up this window again, in an infinite loop.

If I do ping windows_pc.local it works fine. I can also use Remmina to open an RDP connection to that windows PC, and it works fine.

Hi NoBody,

Leaving the domain as SAMBA worked for me when I tried it …

as for the sftp route … you can install the OpenSSH server on Windows, start it and log in to your windows machine from Linux via ssh or sftp. Note: I could not get the sftp://{user}@{machine} to work with the file explorer …

Microsoft provide ssh themselves. You can turn on ssh server on windows without needing to get a 3rd party build.

Do web searches to find out how to configure microsofts build of sshd.

… Guess I could have added this …
In Windows 11:

  1. open settings
  2. navigate to
    System->Optional features
  3. Add an optional feature
    in the search bar “OpenSSH Server” … install it
  4. Then start the task manager
  5. in the Services
    search for sshd
  6. select sshd and right click … goto “Open Services”
  7. select the “OpenSSH SSH Server”
    decide/select how/when you want it to run/start"
  8. from your Linux box
    ssh {windows user}@{ip_address_of_windows_box} user your windows password to login
1 Like

I right-clicked a folder on Windows 11 24H2 → Properties → Share → Name: Media

Then on Linux: smb://192.168.1.152/Media

I managed to solve it by following this SO answer, I copy paste it below:

Try the following (tested on a Fedora VM on a Windows 11 host):

  1. Create a local account user for the Windows PC (Settings → Accounts → Other Users → Add account) (I created sam and created a password)

enter image description here

  1. Share the Desktop folder:

    a. Right click → Properties → Sharing. Click on Share. In the dropdown, select the created user (sam). Click on Add. Click on Share. Click on Done.

enter image description here

b. Back in Desktop, click on Advanced Sharing… Check box Share this folder. Click on Permissions, then click on Add. In the Enter the object names to select enter the created user (sam). Click on Check Names, then OK.

enter image description here

c. Back in the Permission for Desktop, select the created user and give them all permissions in the checkboxes below. Click on Apply then OK. Again Apply and OK. Close the properties window.

enter image description here

  1. Now if you Right click → Properties → Sharing, you will see the share. It will not coincide with the path. It will probably be something like \\DESKTOP-XXXXXX\Desktop. Make a note of the share.

enter image description here

  1. In Fedora File Browser, type smb://sam@DESKTOP-XXXXX/Desktop. Then type the created user’s password.

enter image description here

enter image description here

enter image description here

enter image description here