« Home | Simple HOW TO’s …. How to redirect an URL » | Simple HOW TO’s …. How to setup a Syslog Server » | Booting Single-User Mode » | Terminal Services - Remote Control your W2K Server » | VI (and Clone) Editor Reference Manual » | VI (and Clone) Editor Reference Manual 1. Introdu... » | Booting Linux into Rescue Mode » | How to harden your Unix Server » | Install the Microsoft Loopback Adapter in Windows ... » | How To Install Microsoft Loopback Adapter in Windo... » 

Wednesday, June 20, 2007 

Simple HOW TO’s … How to setup a Passwordless SSH

Simple HOW TO’s …

How to setup a Passwordless SSH:


from source:

1. Generate source key on root account...

# ssh-keygen -t dsa

Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
key fingerprint is:
6f:c5:86:c7:67:69:02:1a:e4:a9:20:e6:16:13:5d:e5 admin1@gohan

2. vi /root/.ssh/id_dsa then copy all content to notepad (need to be one-liner only)


from destination:

3. Do the following

# cd
# mkdir -p .ssh
# chmod 700 .ssh
# vi .ssh/authorized_keys ;then paste key generated from source then save
# chmod 600 .ssh/authorized_keys

DONE!!!


Shortcut:
cat ~/.ssh/id_dsa.pub | ssh user@remotebox "(mkdir .ssh&>/dev/null; chmod 700 .ssh && cat - >> .ssh/authorized_keys )&&chmod 600 .ssh/authorized_keys"

Add to Google

The Author

  • Nick Perrydoo
  • Spawn at Philippines
My profile

Links


Read Ons

Article of the Day

This Day in History

Today's Birthday

In the News

Quotation of the Day

Word of the Day


Powered by Blogger
and Blogger Templates
© Copyright 2006 Ba-zoo-ra - All Rights Reserved.