标签:
1. 远程主机安装ssh-server
sudo apt-get install update
sudo apt-get install openssh-server
2. 本地主机生成密钥对
sudo ssh-keygen -t dsa -P ‘‘ -f ~/.ssh/id_dsa
3. 将公钥发送到远程主机
scp ~/.ssh/id_dsa.pub hadoop@192.168.1.134:~/
4. 在远程主机上把公钥追加到授权key中去,然后删除公钥
cat ~/id_dsa.pub >> ~/.ssh/authorized_keys
rm ~id_dsa.pub
5. 重启远程主机ssh服务
/etc/init.d/ssh start
6. 回到本地主机登陆远程主机
ssh hadoop@192.168.1.134
标签:
原文地址:http://www.cnblogs.com/iamswf/p/4576417.html