Archive for the tag 'key'

Upgrading License Key for Your Plesk Panel

Parallels Plesk Panel comes with a trial license key, which is automatically installed to the control panel. This license key allows you to create one user account, host one Web site and one mail box. Therefore, to fully use the Parallels Plesk Panel as you need, you should obtain a license key from Parallels or one of its resellers and install it to the control panel.

Parallels Plesk Panel will attempt to connect over TCP/IP to the licensing server through port 5224. Please make sure that this is not blocked by a firewall. The update process runs automatically and the Parallels Plesk Panel administrator does not need to do anything unless there is a problem. Should the Parallels Plesk Panel key expire, check your firewall and then go to Home > License Management (in the Help & Support group) and click Retrieve Keys. If the key cannot be updated, contact your reseller or Parallels (if you purchased the license key directly from Parallels).

You can test the connection to the licensing server anytime by going to Home > License Management (in the Help & Support group) and clicking Retrieve Keys.

SBDavid

SSh key passphrase and SSH Agent

SSh key passphrase and SSH Agent

It is recommended to protect the keys with a passphrase. it is straightforward to do so. In fact you will be asked to provide a passphrase to your private key during key generation and you can skip it if you want. In case you did skip it you can lock it again with a passphrase using the following.

$ ssh-keygen -p

Then it will prompt to put the key file path and you should enter then the password which must be more than five chrs.

Of course using keys is not only useful for security reasons, but also for not asking for password every time you use ssh. But thanks to ssh-agent we could save ourselves a few keystrokes, and more importantly use ssh in automated scripts without interrupting the script to prompt for passwords.

SSH Agent

$ eval `ssh-agent`
$ ssh-add /home/buddies/.ssh/buddies_rsa
$ ssh root@myremote.serverbuddies.com

We first ran the ssh agent, which is actually a service.

Then use ssh-add to add the key, then ssh the remote server with only the user name and the remote server address, without providing the key, and if you have protected the key with passphrase you will be asked for the passphrase when you add it.

The ssh-agent help in opening a session so we can use ssh to access remote server without giving any keys or password.

SBDavid

SSH Key generation for Security

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).

SBDavid

RSA key pair generation

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,

$ ssh-keygen -t rsa

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.

$ scp /root/.ssh/id_rsa.pub root@server2:/root/.ssh/authorized_keys

That’s all

Now you can connect the server2 from server1 through SSH without typing the password.

« Prev