SSH免密码登陆
来源:互联网 发布:it软件开发工程师 编辑:程序博客网 时间:2024/04/28 18:52
在linux安装hadoop是为了以后操作方便可以进行免密码设置
1 . 在Xshell 输入 cd 回到当前用户界面
2 输入下面命令
ssh-keygen -t rsa "" 输入这个命令后一直回车就可以了
[root@hadoop ~]# 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)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
b4:75:7a:87:6b:48:4a:48:39:e4:6c:a3:11:fe:ad:38 root@hadoop
The key's randomart image is:
+--[ RSA 2048]----+
| . . |
| . = . |
| o O . . . |
| * * o o . |
| . o S o o . |
| . o o o o |
| E . . . o |
| . . |
| |
+-----------------+
出现如上所示,基本上一直按enter
2 将生成的公钥id_rsa.pub 内容追加到authorized_keys(执行命令:cat id_rsa.pub >> authorized_keys
[root@hadoop ~]# cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
安全起见,你可以退出linux再以root登陆进来一下,我是没做这个步骤
- SSH登陆免密码
- ssh免密码登陆
- ssh 免密码登陆
- ssh免密码登陆
- ssh免密码登陆
- ssh免密码登陆
- ssh 免密码登陆
- ssh 免密码登陆
- ssh 免密码登陆
- ssh免密码登陆
- ssh免密码登陆
- ssh免密码登陆
- ssh免密码登陆
- SSH免密码登陆
- ssh免密码登陆
- ssh免密码登陆
- ssh免密码登陆
- SSH免密码登陆
- JAVASE总结--08(封装、继承、多态)
- Gson解析json数组
- poj 1279
- 制作计算器,包含后缀表达式的求法
- Android-->模仿360底部导航按钮
- SSH免密码登陆
- TCP的流量控制和拥塞控制
- Log4Qt
- 虚拟主机相关知识
- Graphviz -图形可视化,python实现
- IOS 消息机制(NSNotificationCenter)
- Java数据类型转换
- Android Studio 包冲突的解决方法
- Android消息机制