Accessing Samba shares through SSH

By | November 7, 2008

In Linux, you can access Samba shares by using a SSH prompt. We need a host PC ( and a destination PC ( We’ll use jack as a username but first we’ll create a new mount directory:

mkdir -p /samba/share

Now we connect to it:

ssh -N -L 139: jack@ jack@

Now we do a

umount /samba/share

/bin/mount -t smbfs -o username=jack,workgroup=workgroup_name,password=user_password,
//localhost/share /samba/share

2 thoughts on “Accessing Samba shares through SSH

  1. Oleg


    >> mkdir -p /samba/share
    >> …
    >> umount /samba/sales

    …and mount ‘/samba/share’. Why ‘sales’?

    P.S. Will necessary site. 🙂


Leave a Reply

Your email address will not be published. Required fields are marked *