配置linux SSH 等价性
时间:2010-09-16 来源:rock_mis
其实今天突然想到要配置SSH等价性是因为,项目有个小小小小需求,想做到每天同步两边的TDI脚本文件,
但是又不能把root密码写成明文,今天突然想到,可以配置SSH 等价性,使用scp,写成shell脚本,放到crontab里就好了 。
以下为实验环境的配置详情
rhel4-sec主机
[root@rhel4-sec ~]# pwd
/root
[root@rhel4-sec ~]# mkdir .ssh
[root@rhel4-sec ~]# chmod 700 .ssh/
[root@rhel4-sec ~]# cd .ssh/
[root@rhel4-sec .ssh]# 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:
de:15:ee:84:2c:dd:60:9c:39:cd:41:a2:e9:b4:e6:2a