Let's Share Knowledge And Make A Difference

  • Monitor your network and systems like a hawk

    There are some perfact open souce solution for monitoing your Network devices and server system's health. Nagios, Cacti, WhatsUpGold and Smokeping are the leading monitoring tools among them...

    Read More
  • Email service and Security

    Now a days life without email service is unthinkable and E-mail service is quite expensive. As always linux gives us the answer with a strong mail service named postfix...

    Read More
  • Data Center Solution

    A data centre is a facility where companies can keep and operate most of the ICT infrastructure that supports their business. IT host the most critical systems that are vital to the continuity of daily operations...

    Read More

Saturday, September 28, 2013

Passwordless ssh login in RedHat6

Passwordless ssh login in RedHat6

1.1. First install openssh to both machine:
[root@vpn ~]# yum install openssh*

1.2. Now create a pair of keys one is public (id_rsa.pub) and other is private key (id_rsa).
[root@vpn ~]# ssh-keygen -t dsa
[root@vpn ~]# ls -l /root/.ssh/
-rw-------. 1 root root 1675 Sep 27 23:49 id_rsa
-rw-r--r--. 1 root root  402 Sep 27 23:49 id_rsa.pub

1.3. Now keep the public key to the destination server where you want to login passwordlessly. To do so use the below command. here my remote server's ip address is 192.168.1.73
[root@vpn ~]# ssh-copy-id root@192.168.1.73
Now try logging into the machine, with "ssh 'root@192.168.1.73'", and check in:
  .ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

1.4. Lets check its works or not:
[root@vpn ~]# ssh root@192.168.1.73

1.5. Troubleshooting: 
Sometime you may get the below error:
[root@vpn ~]# ssh-copy-id root@192.168.1.73
/usr/bin/ssh-copy-id: ERROR: No identities found

And this is how you should fix the problem:
[root@vpn ~]# ssh-agent $SHELL
[root@vpn ~]# ssh-add -L
[root@vpn ~]# ssh-add

Sometimes it may also gives an error like- "Could not open a connection to your authentication agent". To remove this error, use the following command.
[root@vpn ~]# eval `ssh-agent`

[root@vpn ~]# ssh-add -L
[root@vpn ~]# ssh-copy-id root@192.168.1.72
[root@vpn ~]# ssh root@192.168.1.72

Well all done. See, how easy was that !!! :D

Thursday, September 26, 2013

Your session has expired, but will be resumed after logging in again

Error: Sometimes we get an error at squirrel mail like below-
"Your session has expired, but will be resumed after logging in again."

Solution:
1. First check the mail log for details.
~# tail -f /var/log/mail.log

2. check the petition space of mail partition (default in /var). i.e: use the command-
~# df -h

Most of the times it happens because of low disk space. If your /var partition is  full then delete/move some files/folders to create some space about 5 GB. After the log-in through squirrel mail. You should be able to do it now. :D

Friday, September 20, 2013

How to install and configure torrent client in Redhat 6

How to install and configure torrent client in Redhat 6

First install dependencies:
[root@gw1 ~]# yum -y install openssl* make gcc gcc-c++ autoconf automake openssl-devel curl-devel libevent-devel wget libevent-1.4.so.2

If still libevent is missing then menually download and install it like this way:
[root@gw1 ~]# wget ftp://rpmfind.net/linux/centos/6.4/os/x86_64/Packages/libevent-1.4.13-4.el6.x86_64.rpm
[root@gw1 ~]# rpm -ivh libevent-1.4.13-4.el6.x86_64.rpm

Now we are going to download a torrent client named transmission:
[root@gw1 ~]# wget http://dl.dropboxusercontent.com/u/72284235/transmission.tar.gz

Lets unzip it and install the necessary packages:
[root@gw1 ~]# tar -zxvf transmission.tar.gz
[root@gw1 ~]# cd transmission

To use transmission client only from command line interface (CLI) follow below steps:
[root@gw1 ~]# rpm -ivh transmission-common-2.13-1.el6.x86_64.rpm
[root@gw1 ~]# rpm -ivh transmission-cli-2.13-1.el6.x86_64.rpm

To use transmission client from desktop envirnment follow below step:
[root@gw1 ~]# rpm -ivh *

OK then. Installation is complete now. Lets download a torrent file from magnet link:
[root@gw1 ~]# transmission-cli magnet:?xt=urn:btih:4d2220f8855996486033ff7b83f5e5d0ba863640&dn=New+Avengers+010+%282013%29+%28Digital%29+%28Zone-Empire%29&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A6969&tr=udp%3A%2F%2Ftracker.ccc.de%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337

To stop the transmission software use the below command:
[root@gw1 ~]# pkill -9 transmission

Resume the download:
[root@gw1 ~]# transmission-cli /root/.config/transmission/torrents/New\ Avengers\ 010\ \(2013\)\ \(Digital\)\ \(Zone-Empire\).cbr.4d2220f885599648.torrent

Stop the download:
[root@gw1 ~]# pkill -9 transmission