Linux

Categorized | Networking

Accessing Samba shares through SSH

In Linux, you can access Samba shares by using a SSH prompt. We need a host PC (65.219.4.23) and a destination PC (192.168.0.81). 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:192.168.0.81:139 jack@65.219.4.23 jack@65.219.4.23

Now we do a

umount /samba/share

/bin/mount -t smbfs -o username=jack,workgroup=workgroup_name,password=user_password,
port=139,dmask=770,fmask=660,netbiosname=homecpu
//localhost/share /samba/share

Author Profile

T4L ;

Other posts by T4L

Author's web site



Are you satisfied with this blog?
Why not subscribe our RSS Feed? you will always get the latest post.


2 Comments

  1. Oleg

    Hi.

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

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

    P.S. Will necessary site. :)

    1
  2. T4L

    Fixed :) Thanks for the notice.

    2

Leave A Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>