Jun 15, 2008
HOWTO: Passwordless logins between servers
Author: gaweee | Filed under: development, howto
Before i get into this HOWTO, its worth noting that the use of passwordless logins can be really dangerous when it applies on an organizational level. Some organizations do not have any operating procedures in place to remove inactive employee accounts much less bother to check for ssh authorized keys. That being said, i’ve found this technique tremendously useful in creating backup server relations between one or more servers.
So if you’ve properly weighted your pros and cons, here we go…
So if you’ve properly weighted your pros and cons, here we go…
Step 1 – generate your RSA/DSA keypair
gaweee@wits:~$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/gaweee/.ssh/id_rsa): [enter] Enter passphrase (empty for no passphrase): [enter] Enter same passphrase again: [enter] Your identification has been saved in /home/gaweee/.ssh/id_rsa. Your public key has been saved in /home/gaweee/.ssh/id_rsa.pub. The key fingerprint is: 2c:1f:fb:f0:ae:2b:88:99:60:ee:eb:a5:83:3c:3c:c4 gaweee@wits
Why? Distribution of these keys is crucial to logging into the remote server without having to key in your password.
The 2 files created: /home/gaweee/.ssh/id_rsa and /home/gaweee/.ssh/id_rsa.pub are your private and public keys respectively. Keep your private key to yourself ONLY.
Step 2 – Distribute the public key to target servers
gaweee@wits:~$ scp .ssh/id_rsa.pub somenewserver:.ssh/authorized_keys gaweee@somenewserver password: [password]
this uses scp to put the public key onto the new server’s authorized_keys.
Viola! and you’re done!
read users' comments (0)
Most Popular
- HOWTO: PHP and jQuery upload progress bar (56)
- JQuery Progress Bar 1.1 (53)
- Howto: Repackageable custom extension development in Magento - Part 2 - Admin Controller (25)
- JQuery Progress Bar 2.0 (21)
- Howto: Repackageable custom extension development in Magento - Part 8 - CRUD - Update (18)
- HOWTO: struts 2 i18n (16)
- Howto: Repackageable custom extension development in Magento (12)
- JQuery Progress Bar 1.2 (11)
- Howto: Repackageable custom extension development in Magento - Part 9 - Frontend - List (10)
- Howto: Repackageable custom extension development in Magento - Part 3 - Database (9)
Recent Comments
- Karen: Great work around-thank you!!
- Sheldon: awesome possum!
- cmstop里所使用的有用的jquery插件 » Terry's Blog: [...] http://t.wits.sg/jquery-progress-bar/ 这篇日志的 t.cn [...]
- Lakshyami: Hi, Thank you very much for
- New site feature: User Poll « TechnoStripe: [...] progress bar used to
- seo agentur: @Krish Why do you need to
- 2kai: Hi Aromal, you need to flush
- Rob Rasner Magic Castle: I love what you guys
- รับทำเว็บไซต์: Thx for this. Nice and
- Lexus: ESxtYC I'm not easily impressed.
Latest Entries
- SD in the Community: Product Management Panel Recap
- Mac OS X and Ricoh Aficio C2051 - Making Printing "Just Work"
- How to impress your recruiter
- Thoughts on Attracting the attention of the Best Hires
- The Greg Syndrome
- The Parental Manager
- Attack of the Facebook Harvesters
- jQuery Progress Bar Configuration
- Extracting email addresses from inbox
- 10 Good (Free and Legal) Source for Photos and Images