I've set up an SSH tunnel to SMB on a remote Windows server, and want to access it using the Finder. I set up the tunnel using the command:

ssh warren@sshserver.local -p 3484 -L 1445:windowsserver:445

(445 is the default Windows file sharing port, which I haven't changed. My SSH server is configured to use port 3484 instead of 22).

The tunnel sets up all fine and dandy. Then, in Finder, I click "Go -> Connect to Server," enter "smb://localhost:1445" and hit return. I immediately get the error "The server 'localhost' is available on your computer. Access the volumes and files locally." Except, of course, that's a dirty lie, since localhost:1445 is a tunnel, not the ultimate destination.

Is there any way to suppress this behavior and force Finder to actually connect to the tunnel despite the fact that it has "localhost" in the name?


You should be able to mount the server from the command line with mount_smb:

mkdir /Volumes/sharename
mount_smbfs //smbusername@localhost:1445/sharename /Volumes/sharename

I'd make a symlink for this. Link the smb:// address to a local folder, so you can go into that folder and see what's on the share. I haven't used symlinks for this specific purpose, but I think they should work. Interested in hearing if they do.

  • When trying to open the symlink, I get The operation can’t be completed because the original item for “link” can’t be found. – Afriza N. Arief Oct 13 '18 at 3:54

You must log in to answer this question.

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