Unifix knowledge database - The original one

Dashboard - News - Search - List - About - Admin


SSH without password in Linux

Author:black - Wed Oct 27 09:59:03 2004

make keyfiles:
 ssh-keygen -t rsa
press enter all three times. (no passphrase)

go to ~/.ssh/
send the public keyfile to {user} account on {ip}:
 ssh {ip} -l {user} 'cat >> .ssh/authorized_keys' < id_rsa.pub

remember to keep the id_rsa file secure! It can be used on other machines as well...

To use the key in putty:
Install the entire putty suite (pageant, putty, puttygen).

Open puttygen.
use Conversions -> Import key -> find id_rsa and load it.
When loaded, press 'Save private key'
Save the key as .PPK in a secure place (NTFS permissions ring a bell?)

Now, open pageant
It will load into your system tray.
Double click it, to view installed keys.
Add your newly generated PPK key.

Now you have the abillity to log in via putty, with the keyfile authentication.
Remember to 'Allow agent forwarding' in the putty default settings.
(Connection -> SSH -> Auth)
You can also save a remote host with username.
(Connection -> Auto-login username)

Every time you reboot, you must start pageant, and load the key.
You can of course automate pageant to start, but it will, by design, forget any loaded keys.
Copyright(c) Unifix.org 2002-2011


Dashboard - News - Search - List - About - Admin
 
Powered by Mikjaer Consulting Solutions - Hosted by Specialhosting.dk