Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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
share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.