As we saw earlier, Rsync can be a nifty tool to transfer data across the systems in an organization while taking backup. However, its prompt for password during transfers can irritate everytime you transfer. Even having a cron-job for automatic backups using rsync will mean you having to enter password which defeats the purpose of cron-job. Here I will show you how you can use rsync over ssh to sync data across computers without password. That’s right, password less transfers with rsync.
First on your server(IP:192.168.100.101) create a ssh key using ssh-keygen,
It will ask you for a location, hit enter for the default location. Next you’ll be prompted for a pass-phrase, hit enter & confirm it with another enter. We want the pass-phrase to be blank. You’ll get the following.
Generating public/private rsa key pair.
Enter file in which to save the key (root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
Next we will need to copy the public key to the remote system(192.168.100.102). On the local system(192.168.100.101) enter the following;
#ssh-copy-id -i /root/.ssh/id_rsa.pub 192.168.100.102
You’ll be prompted for password for the remote system. Once you enter it, the key will be copied on the remote host. Now you can use rsync to connect & transfer to the remote system(192.168.100.102) without any password prompt.
#rsync -avz -e ssh /root/Desktop/test firstname.lastname@example.org:/root/Desktop
Now the transfer will be commenced without any prompt for password. You can transfer your public key to various other systems on your network to facilitate a password-less rsync over ssh.
At times, we need to combine multiple pdf file’s into one pdf file. However, instead of running to get a dedicated program to join the multiple pdf’s, here is a simple & fast way to do so.
Convert command can be used to merge multiple pdf’s into one. Convert command is a subset of the ‘ImageMagick’ suite of tools. So you’ll need to install it first from your distribution’s repository. On a Fedora/Red Hat system it can be done by;
#yum install ImageMagick
Once installed, simply open a terminal & navigate to the directory where you have the multiple pdf’s which need to be merged into one pdf. Once there issue;
$convert file1.pdf file2.pdf output.pdf
I created a calendar for the coming year & in all had 12 pdf’s for each month which I wanted to be merged into one. Hence, I issued the following;
$convert Jan.pdf Feb.pdf March.pdf April.pdf May.pdf June.pdf July.pdf August.pdf September.pdf October.pdf November.pdf December.pdf calendar.pdf
Here my output pdf file will be named ‘calendar.pdf’. Once you execute the above command, it will take sometime(depending on how big or small & how many pdf’s are) and once done it will return you to the prompt. Now your merged pdf file will be saved in the same folder by the name you gave in the command above.
That’s it! It’s so easy.
Diwali, the festival of lights. During the festival, the entire city is adorned with sparkling lamps, colouful lanterns(kandils) & rice lights(torans). The atmosphere is of utmost happiness as the festival marks the triump of goodness. I hit the streets to capture all the energy & passion of this festival & here is my take on the ‘Festival of Lights’. Hope you enjoy & get soaked in the festive spirit. Cheers!🙂
I’ve confessed before that apart from Photography, I have a keen interest in Cinematography too. Offcourse, I’m a photographer first but have a urge to learn about the wonderful world of Video/Film-Making & create good short films. Since investing in an video camera is not a budget solution, I would be learning to make videos on DSLR camera’s which offer more than decent quality. For time-being, I don’t have a DSLR but I always thought of making a short film just to make myself happy & improve on my filming skills. Left with no option but my Canon Powershot SX100 IS still camera, I decided to film a short film on it.
Photo collage make for a wonderful gift. It makes for a good gift since one can include photographs shot across various time-line of a relation which when looked back brings immense satisfaction. Being a photographer, my friends have been receiving such photo collages from me. To make this collage, I use a nifty piece of software known as “FotoWall”.