Sunday, December 11, 2005

Password-less logins from BE to FE (ssh keys)

On backend:

[root@myth ~]# 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:
bb:78:5e:c0:8d:28:36:e3:91:37:d6:3b:b7:6d:d9:21 root@myth.donnlee.com
[root@myth ~]#

scp id_rsa.pub to FE in a tmp dir.

Then on FE, add id_rsa.pub (BE's public key) to FE's authorized_keys file:

[root@be .ssh]# cat ~/tmp/backend_rsa_pubkey >> ~/.ssh/authorized_keys

0 Comments:

Post a Comment

<< Home