Wednesday, May 13, 2009

Tips SSH without using a password (ssh-keygen)

SSH Secure Shell is also called, is a remote computer console (command line) that introducing by LINUX.
SSH uses port 22 (default).

How to use SSH:

# ssh (ip destination)

Using SSH without using passwords.
Things that need to do:
1. ssh-keygen ssh-keygen
bash-3.2# ssh-keygen -t rsa
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.
The key fingerprint is:
0a:2f:ca:50:88:5f:f6:a6:e4:de:7f:61:77:5a:17:43 root@punyaku.com

note: empty (press enter) Enter passphrase in part.
Then will id_rsa.pub file in the / root / .ssh

2. Copy id_rsa.pub files to other computers with rename file to authorized_keys

bash-3.2# scp ~/.ssh/id_dsa.pub (destination ip):~/.ssh/authorized_keys

After successfully to copy a file, then try to SSH to the destination computer.
If the remote without using a password then we have succeeded in the experiment.

To use SSH or remote without using a password we need to consider risk as it could be a problem for our own (admin) because they can simply log in without using a password.
Congratulations

Regards.

Customize your needs

No comments:

Post a Comment