1.ssh-keygen -t rsa 生成公私钥
2. scp 到从机,再cat后>>重要 cat id_rsa.pub >> authorized_keys
3.非常重要的 chmod 700 .ssh
chmod 600 authorized_keys
4. /etc/init.d/sshd restart
和其他hostname /etc/hosts 无关
只能poa当前用户下用ssh poa@ip ‘command’
用java实现执行ssh,想操作jdbc一样密码登陆
http://www.ganymed.ethz.ch/ssh2/