Posted on Thu 07 April 2016

Using the samba server along with SSH

The Samba Server and SSH

Well,this article was long due. Speaking from the perspective of a newcomer to linux, the samba server was something that had caught my eye in my sophomore year. That very next day I had setup a small system at my home. The blog that you are reading right now is stored in my home server. I don’t have any files locally on my laptop. B)

Yes.. Speaking of Samba, its quite easy to setup and install it. You can refer the steps here but ya.. i’ll be going over them too..

For, ubuntu, I’d say, simply run these commands

sudo apt-get update
sudo apt-get install samba

Once you have installed samba, open the /etc/samba/smb.conf file and make the changes as below.

  1. Create a folder to be shared on the network ( /home// )

  2. Next,

    sudo cp /etc/samba/smb.conf ~
    

    Here you are essentially copying and placing the samba conf file in a safe location.

  3. Further,

    sudo <nano | vi | gedit| basically anytexteditor > /etc/samba/smb.conf
    
  4. Go to the very end of the file . (If your using nano , simply press ‘ALT /’

  5. Add the following snippet

    [<name_of_folder]
    path=/home/<username>/<name_of_folder>
    read only = no
    
  6. Save the file and restart samba

    sudo service smbd restart
    
  7. To access any samba file, install smbclient. You can run an apt-get install smbclient

  8. To checkin
    smbclient //ipaddress/foldername
    

Some Tips If you plan on using this, i recommend that you make the server ip static. Goto your router settings and reserve the ip for whichever system you are putting this on. It’s much simpler to do so.

Next I also recommend you to set up an SSH connection over your local machines. This is what I use. Using samba for convinient file transfers and SSH to control further commands.

Setting up SSH for local networks is very simple. Install SSH using `

sudo apt-get install SSH

and simply type

ssh user@IP

Make sure , both the endpoint machines are equipped with the dependencies.

Just fire it up and enjoy… Access your files freely and sit back on your bean bags and relax


comments powered by Disqus