- 论坛徽章:
- 3
|
本帖最后由 tomer 于 2013-03-04 16:28 编辑
回复 7# seesea2517
恩。这个脚本可以每台都进去,再出来。,
我还想加的内容:进去每台机器后执行两条命令:,如何加进去
ssh-keygen -t rsa &>/dev/null
cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys &> /dev/null
-bash-3.2$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa): <--需要回车
/home/oracle/.ssh/id_rsa already exists.
Overwrite (y/n)? y <--需要敲y
Enter passphrase (empty for no passphrase):
Enter same passphrase again: <--需要回车
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
97:ad:3c:7e:45:6a:57:df:78:a3:8b:d4:59:f3:b9:15 oracle@localhost.com
-bash-3.2$ |
|