ssh面密码登录配置-hadoop安装准备
1. 用ssh-keygen创建公钥,一直回车即可
root@kali:~# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
/root/.ssh/id_rsa already exists.
Overwrite (y/n)?
2. ssh本机,提示输入密码。。。
root@kali:~/.ssh# /etc/init.d/ssh start
[ ok ] Starting OpenBSD Secure Shell server: sshd.
root@kali:~/.ssh# ssh localhost
root@localhost's password:
3. 将公钥拷为authorized_keys, 再实验ssh localhost,即可免密码登录
root@kali:~/.ssh# cp id_rsa.pub authorized_keys
root@kali:~/.ssh# ls
authorized_keys id_rsa id_rsa.pub known_hosts
root@kali:~/.ssh# ssh localhost
Linux kali 3.7-trunk--pae # SMP Debian 3.7.-+kali8 i686 The programs included with the Kali GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright. Kali GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Dec 19 22:41:22 2013 from localhost
4. 将公钥拷至被管理机上,再试试。喔??报错啦!
root@kali:~# ssh 192.168.0.102
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
:4e:4f:2b:b4:::7c:d2:::be::8d:bb:5f.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending RSA key in /root/.ssh/known_hosts:
RSA host key for 192.168.0.102 has changed and you have requested strict checking.
Host key verification failed.
这种情况是因为要ssh的机器上的ssh重新安装或者系统重装了,导致RSA host key 失效,解决方法:cd ~/.ssh 然后 rm -f known_hosts 即可重新登录
root@kali:~/.ssh# scp id_rsa.pub root@192.168.0.102:~/.ssh/authorized_keys
id_rsa.pub % .4KB/s :
root@kali:~# more /etc/hosts
127.0.0.1 localhost
192.168.0.101 node1
192.168.0.102 node2
# The following lines are desirable for IPv6 capable hosts
:: localhost ip6-localhost ip6-loopback
ff02:: ip6-allnodes
ff02:: ip6-allrouters
root@kali:~# ssh node2
The authenticity of host 'node2 (192.168.0.102)' can't be established.
RSA key fingerprint is :4e:4f:2b:b4:::7c:d2:::be::8d:bb:5f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node2' (RSA) to the list of known hosts.
Linux bt 3.2. # SMP Fri Feb :: EST i686 GNU/Linux System information as of Mon Mar :: CST System load: 0.0 Processes:
Usage of /: 41.9% of .15GB Users logged in:
Memory usage: % IP address for eth1: 192.168.0.102
Swap usage: % Graph this data and manage this system at https://landscape.canonical.com/
Last login: Mon Mar ::
root@bt:~# 这里已经登入了。。。
在此,已经完成了管理节点到被管理节点的免密码登录。
5. 将两机的authorized_keys文件合并。拷贝至两台机器上, 即可实现双机互相面密码登录
root@bt:~/.ssh# cat id_rsa.pub >>authorized_keys
root@kali:~/.ssh# scp root@node2:~/.ssh/authorized_keys .
authorized_keys % .8KB/s :
root@bt:~/.ssh# ssh node1
The authenticity of host 'node1 (192.168.0.101)' can't be established.
RSA key fingerprint is ::d5:b1:ae::0f:1d:3d:3d:::9f:6f:e1:7c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'node1,192.168.0.101' (RSA) to the list of known hosts.
Linux kali 3.7-trunk--pae # SMP Debian 3.7.-+kali8 i686 The programs included with the Kali GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright. Kali GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Mar 3 21:19:04 2014 from localhost
root@kali:~# 这里实现了node2 登录node1
ssh面密码登录配置-hadoop安装准备的更多相关文章
- Centos6.5之ssh免密码登录配置
Centos6.5之ssh免密码登录配置 centos ssh 免密码登录 0.说明 这里为了方便说明问题,假设有A和B两台安装了centos6.5的主机.目标是实现A.B两台主机分别能够通过ssh免 ...
- ssh免密码登录配置方法
每次输密码很麻烦,免密登录设置方法按照<ssh免密码登录配置方法>即可,简单来说: 1.终端上执行ssh-keygen -t rsa,生成密钥对(存放在/home/usera/.ssh). ...
- SSH免密码登录配置
ssh免密码登录Permission denied (publickey,gssapi-keyex,gssapi-with-mic) 的解决方案 1.在hadoop目录 新建.ssh目录 使用:ssh ...
- SSH免密码登录配置方法详解
1.测试主机配置信息: 192.168.100.236 db06.chavin.king db06 192.168.100.237 db07.chavin.king db07 2.创建测试用户: gr ...
- ssh免密码登录配置方法,(图示加命令)
首先,说明一下我们要做的是,serverA 服务器的 usera 用户免密码登录 serverB 服务器的 userb用户. 我们先使用usera 登录 serverA 服务器 [root@serve ...
- Linux多台服务器间SSH免密码登录配置
SSH实现各个服务器间的文件相互备份,如运行scp命令,可以实现免密码登录,从而可以使用SHELL脚本实现一些自动化的处理. 假如A机要免密码登录B机,具体方法如下: 1.在A机运行:"ss ...
- ssh 免密码登录配置,及其原理
1.废话不多说,先上图 2. 典型的RSA非对称加密 RSA加密算法是一种典型的非对称加密算法,它基于大数的因式分解数学难题,它也是应用最广泛的非对称加密算法,于1978年由美国麻省理工学院(MI ...
- CentOS 6.5配置SSH免密码登录
centos 系统对权限的设置非常微妙,如果权限设置大了则ssh 拒绝,如果权限小了,则ssh 更是被拒绝(我曾经配置好久没有打通,就是因为权限过大的原因) 参考链接:http://www.linux ...
- Xshell配置ssh免密码登录-密钥公钥(Public key)与私钥(Private Key)登录【已成功实例】
本文转自https://blog.csdn.net/qjc_501165091/article/details/51278696 ssh登录提供两种认证方式:口令(密码)认证方式和密钥认证方式.其中口 ...
随机推荐
- [技术选型] dubbo
分布式服务架构 - 阿里开源项目 简介 Dubbo架构设计详解 Dubbo与Zookeeper.SpringMVC整合和使用(负载均衡.容错)
- jsp页面利用JS做即时时间显示
想给系统多些点缀,顺便把知识点温习一遍,不过讲真,这些都是网上扒的!我的水平现在也就这样 <%@page import="javax.xml.crypto.Data"%> ...
- C语言中重要的小知识汇总
用于整理记录一些C语言下的小知识点: 1. 在C语言中,怎么查看一个数据类型占用了多少个字节大小呢? 可以使用sizeof(int)/sizeof(double)等来查看某数据类型到底用了几个字节: ...
- Office在线预览及PDF在线预览的实现方式
原文链接:http://www.officeweb365.com/officetoview.html 一.服务器先转换为PDF,再转换为SWF,最后通过网页加载Flash预览 微软方:利用Office ...
- Linux目录和文件管理
今天我们来介绍一下对于Linux系统“命令“的理解和分类以及常用的目录文件管理命令的使用. 一. 命令 用于实现某一类功能的指令或程序,命令的执行依赖于解释器程序(例如:/bin/bash) 分类 内 ...
- 腾讯QQ家族任意支付QB+修改资料csrf
http://jz.qq.com/m_card.shtml POST /cgi-bin/league_change_userinfo HTTP/1.1 Host: jz.qq.com Connecti ...
- Android 获取内存信息
由于工作需要,研究了一下android上获取内存信息的方法,总结如下: 1.SDK获取 在Java层利用API获取很简单,直接使用ActivityManager.MemoryInfo类即可,代码如下: ...
- ★Wireshark基本介绍和学习TCP三次握手
之前写过一篇博客:用 Fiddler 来调试HTTP,HTTPS. 这篇文章介绍另一个好用的抓包工具wireshark, 用来获取网络数据封包,包括http,TCP,UDP,等网络协议包. 记得大学的 ...
- Java读写配置文件——Properties类的简要使用笔记
任何编程语言都有自己的读写配置文件的方法和格式,Java也不例外. 在Java编程语言中读写资源文件最重要的类是Properties,功能大致如下: 1. 读写Properties文件 2. 读写XM ...
- oracle18c linux x86-64 install 杂记
132 yum install libstdc++-devel 133 yum install compat-libstdc++-33 135 yum install compat-libcap1 1 ...