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)
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.
Create a folder to be shared on the network ( /home/
sudo cp /etc/samba/smb.conf ~
Here you are essentially copying and placing the samba conf file in a safe location.
sudo <nano | vi | gedit| basically anytexteditor > /etc/samba/smb.conf
Go to the very end of the file . (If your using nano , simply press ‘ALT /’
Add the following snippet
[<name_of_folder] path=/home/<username>/<name_of_folder> read only = no
Save the file and restart samba
sudo service smbd restart
To access any samba file, install smbclient. You can run an apt-get install smbclient
- To checkin
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
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