Passwordless SSH on Site5

opensshConnecting to remote computer via SSH protocol will always be fun. Above all, it’s secure. This connection usually run on port 22, and use combination of username and password to connect on remote host. Because everything is encrypted, this connection is a little bit slower than other protocols. That’s ok, since the connection more secure ;).

Recently, I moved my hosting to Site5. Site5’s hosting features that offer SSH access drive me faster to buy it. After enabled it on Cpanel, then I have a SSH connection parameters on my hands. Just issue this command to connect:

:~ % ssh username@remotehost

Or if you in windows, you can use Putty, a free SSH client.

Then type your password on password prompt, then [ENTER], now you are connected.

Ok, I am sure you have understand that simple mechanism. Now, let me show you how to do passwordless SSH.

On you local computer type:

:~ % ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/username/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/username/.ssh/id_dsa.
Your public key has been saved in /home/username/.ssh/id_dsa.pub.
The key fingerprint is:
59:8e:28:5f:99:55:de:07:11:1e:a8:f9:b9:df:07:ba username@hostname

As you can see above, there are two files that are generated by ssh-keygen command, id_dsa and id_dsa.pub. id_dsa is like private key, and id_dsa.pub is a public key, you can read more detail about Public key cryptography on Wikipedia.

Then, copy id_dsa.pub to Site5, then rename it as authorized_keys in folder .ssh on your home directory. To simplify this process, you can issue this command:

:~ % scp .ssh/id_dsa.pub username@hostname:.ssh/authorized_keys

Above command will transfer id.ssh/_dsa.pub from local computer to .ssh/authorized_keys on remote host.

Congratulations, now you have passwordless SSH connection. If you have any trouble you can read here or you can post it on comments below. See you on next post ;).



Share and Bookmark


5 Comments to “Passwordless SSH on Site5”

  1. [...] i’m using in this tutorial is SSH Access. You can read more about it here. And you can read this tutorial to gain more speed in your PrestaShop installation time. I’m using Ubuntu as my OS, you can [...]

  2. alifity says:

    Of course. It’s like using standard set combination of encryption. Wikipedia has good explanation about it on http://en.wikipedia.org/wiki/Public-key_cryptography. Give it a try!

  3. Stret.Walker says:

    is it secure from public??? :-s

  4. alifity says:

    Thanks for coming Ben.. glad to see you here and BIG thumbs for the Site5 :D

  5. Ben says:

    Nice tutorial, thanks!

Leave a Reply