How to disable Finder’s “is available on your computer” message

finderssh

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?

Best Answer

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