Cpanel Bandwidth Statistics Generation
The bandwidth statistics system in cPanel™ uses RRDTool [http://oss.oetiker.ch/rrdtool/] to track the data and generate
resulting graphs and meters. In cPanel™ 11.24 and prior versions, the way the RRDTool data was interpreted by the sys-tem could vary according to which subsystem was examining the data. This often resulted in inconsistent interpretations of the data, as well as missing data.
For cPanel™ 11.25, every aspect of the product that handled RRDTool data was overhauled and consolidated into a single subsystem. The end result is a consistent system that generates reliable and accurate statistics and data.
SSH Key generation for Security
We need to generate a pair of keys, on public for the server to encrypt the data and a private key, which is the only key that could decipher the encrypted data, and this private key is by definition should be kept private. There is many secure algorithm for encryption with different degree of encryption strength.
There is DSA and RSA, DSA is the standard encryption for the USA government, DSA keys has a 1024 size limit, whereas RSA is unlimited .
RSA key with a 2048 length, here are the steps.
$ ssh-keygen -v -t rsa -b 2048
Generating public/private rsa key pair.
Enter file in which to save the key (/home/buddies/.ssh/id_rsa): /home/buddies/.ssh/buddies_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/buddies/.ssh/buddies_rsa.
Your public key has been saved in /home/buddies/.ssh/buddies_rsa.pub.
The key fingerprint is:
66:d2:cc:7b:6a:62:f9:f5:c6:ef:69:fc:7b:87:0d:46 buddies@buddies
and then
$ chmod 600 /home/buddies/.ssh/buddies_rsa
$ scp /home/buddies/.ssh/buddies_rsa.pub buddies@myremote.server.com:/home/buddies/.ssh
on remote server we should do the following.
$ cat /home/buddies/.ssh/buddies_rsa.pub > /home/buddies/.ssh/authorized_keys
You will be asked for the login password on remote before the copying commences.
The file will be copied to login user home directory on remote (/home/buddies in that case).
RSA key pair generation
RSA keys are used to avoid the login prompt when you try to SSH to the server. Generating RSA keys is very simple.
Please follow the steps given below.
From the server1,
Press key to accept the default file location of /root/.ssh/id_rsa
Change the permission to 755 to the directory “/root/.ssh/id_rsa”
$ chmod 755 /root/.ssh/id_rsa
Now create a file “/root/.ssh/authorized_keys” on the target system.
$ touch /root/.ssh/authorized_keys
From server1, copy the contents of the file “/root/.ssh/id_rsa.pub” to the file “/root/.ssh/authorized_keys2″ on server2. You can do it using the command “scp” as follows.
That’s all
Now you can connect the server2 from server1 through SSH without typing the password.