on my Fedora box i want to mount a Windows Server Share via a ssh tunnel. The setup consists of two parts, ssh and mount part.

Part 1.) i do a ssh portforwarding of Port 445 from windows server to my Fedora box via a linux gateway

sudo ssh -C -L [email protected]

that works fine and i can access the Windows Server share on my Fedora box in Filemanager or with smbclient on address smb://

ok, but i want to use that share via linux filesystem. Therefore i need to mount it

sudo mount -t cifs // /mnt/smb -o username=domaineuser.msserverdomaine

but now the problems occure. It asks me about the domaine password on the MS Server.

Password for domaineuser.msserverdomaine@//

which seems already not like a valid account. And after providing the pwd i got a

mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

Dmesg shows me

[41077.581330] CIFS: VFS: Malformed UNC in devname
[41109.021447] Malformed UNC in devname

So, wheres my mistake? It seems clear that mount got's confused with the ssh portforwardimng. What to do?

1 Answer 1


Your syntax for specifying the domain name is wrong. Try:

sudo mount -t cifs // /mnt/smb -o username=domaineuser,domain=msserverdomaine
  • Thank you. You pointed me to the correct and complete solution. What was missing is the ability to write to the mounted share via sudo mount -t cifs // /mnt/smb -o username=domaineuser,domain=msserverdomaine,uid=LinuxUserID,gid=LinuxUserGroupID
    – Chris9834
    Apr 19, 2022 at 12:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .