SSH无密码登录配置(主要针对Hadoop配置)
1、修改服务器侧的[/etc/ssh/sshd_config]文件内容(将配置文件中的以下3个配置项放开)
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys
同时修改以下两项配置
PermitRootLogin no
StrictModes no
2、重启服务器侧的sshd服务
/etc/init.d/sshd restart
3、在客户端执行以下命令,用来生成秘钥和公钥(一路回车,无需设置)
ssh-keygen -t rsa
4、将客户端及服务器端生成的公钥保存到服务器端的[/home/hadoop/.ssh/authorized_keys]文件中
5、然后将服务器端的[/home/hadoop/.ssh/authorized_keys]拷贝到客户端
6、重启ssh服务
/etc/init.d/sshd restart
7、使用ssh命令登录服务器测试即可
SSH无密码登录配置(主要针对Hadoop配置)
猜你喜欢
转载自mryangjw.iteye.com/blog/2062690
今日推荐
周排行