Linux下SSH免密码登录
来源:互联网 发布:人工智能打破行业界限 编辑:程序博客网 时间:2024/05/18 02:31
搭建hadoop集群的时候一定会用到的就是SSH免密码登录
[hadoop@hadoop1 ~]$ ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/home/hadoop/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/hadoop/.ssh/id_rsa.Your public key has been saved in /home/hadoop/.ssh/id_rsa.pub.The key fingerprint is:26:96:da:89:60:3d:90:75:43:bf:eb:56:d1:52:d9:68 hadoop@hadoop1The key's randomart image is:+--[ RSA 2048]----+| ..+ + || o . o E . || o . + || o . .o . || o o + S o || . . * + .. || o o .. || .. || .. |+-----------------+[hadoop@hadoop1 ~]$ cd .ssh[hadoop@hadoop1 .ssh]$ scp -r id_rsa.pub hadoop@hadoop3:/home/hadoop/.ssh/authorized_keysThe authenticity of host 'hadoop3 (192.168.127.120)' can't be established.RSA key fingerprint is 03:be:af:08:19:27:6d:15:7e:dd:90:fa:09:b3:14:2f.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'hadoop3,192.168.127.120' (RSA) to the list of known hosts.hadoop@hadoop3's password: id_rsa.pub 100% 396 0.4KB/s 00:00 [hadoop@hadoop1 .ssh]$ ssh hadoop3Last login: Sat Aug 4 17:35:22 2012 from hadoop1
如果不能没有成功
方法一:
[hadoop@hadoop3 ~]$ chmod 700 .ssh/[hadoop@hadoop3 ~]$ cd .ssh[hadoop@hadoop3 .ssh]$ chmod 600 authorized_keys
方法二:
[root@hadoop3 .ssh]# vi /etc/ssh/sshd_config AuthorizedKeysFile .ssh/authorized_keys 把前面的#号去掉[root@hadoop3 .ssh]# /etc/rc.d/init.d/sshd restartStopping sshd: [ OK ]Starting sshd: [ OK ]
- Linux下SSH免密码登录
- Linux下SSH免密码登录
- Linux下配置SSH免密码登录
- Linux下SSH免密码登录
- Linux下SSH免密码登录
- Linux下SSH免密码登录
- Linux下SSH免密码登录
- Linux下SSH免密码登录
- Linux下实现SSH免密码登录
- 【linux】SSH免密码登录
- linux ssh 免密码登录
- linux ssh免密码登录
- Linux SSH免密码登录
- Linux SSH免密码登录
- Linux SSH 免密码登录
- linux ssh 免密码登录
- linux:ssh免密码登录
- Linux SSH 免密码登录
- Linux vi全局替换方法
- C++ memory Leak
- return break continue exit的区别
- 点关于直线的对称点
- Java栈与堆
- Linux下SSH免密码登录
- {{Shell}}复制或镜像整个网站
- Eclipse快捷键大全
- JAVA中的传递都是值传递吗?有没有引用传递呢?
- mysql导入数据库文件最大限制更改解决方法
- 高内聚低耦合
- py2exe下载
- Proteus的所有元件分类及子类
- 整合Spring 3.1.1 + mybatis +struts2.3.4 jar包 记录