SSH tunnel for remote Samba server access

Need a quick, secure method for accessing your Samba shares offsite? Read this user-submitted tip.

On occasion I use a SSH tunnel for VPN access to my Samba shares when I'm offsite. This allows me to quickly and securely access my data.
# ssh -N -f -L <some unused local port above 1024>:<remote ip or dns name>:139 <ssh username>@<remote ip or dns>

# mount -t smbfs -o port=<your chosen local port>,ip=127.0.0.1,username=<samba account>,password=<account password> //localhost/<desired samba share> <target mount directory>

This was first published in March 2004

Dig deeper on Open source Web and application servers

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataCenter

SearchServerVirtualization

SearchCloudComputing

SearchEnterpriseDesktop

Close