ssh免密码登陆Linux
来源:互联网 发布:淘宝新手卖家群 编辑:程序博客网 时间:2024/05/22 13:47
现需设置 主机A 免密码登陆 主机B
主机A: 192.168.0.61主机B: 192.168.0.62
1、在主机A中生成公钥和私钥
cd /~/.sshssh-keygen -t rsa
主机A的提示如下,在要求输入密码(Enter passphrase)的提示中按回车即为空密码
Generating public/private rsa key pair.Enter file in which to save the key (/Users/Allen/.ssh/id_rsa): /Users/Allen/.ssh/id_rsaEnter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /Users/Allen/.ssh/id_rsa.Your public key has been saved in /Users/Allen/.ssh/id_rsa.pub.The key fingerprint is:SHA256:luC3egH9J9VEDYxToA8VS6oPlXT8jiViukOvmc/n2+I Allen@localhostThe key's randomart image is:+---[RSA 2048]----+| ..*B+o || . B+.o .|| .. * .= || ....+ooo + || ..S+ o.= || o++o o . || ..+.o || .++. o. || ..++o+Eo. |+----[SHA256]-----+
2、把主机A生成的公钥id_rsa.pub复制至主机B
scp id_rsa.pub root@192.168.0.62:/root/.ssh/id_rsa.pub
3、在主机B上把主机A的公钥复制至authorized_keys
cat id_rsa.pub >>/root/.ssh/authorized_keys
完成上述步骤后,下次在主机A(192.168.0.61)上使用ssh root@192.168.0.62 登陆主机B(192.168.0.62)将不需要密码
0 0
- linux ssh 免密码登陆
- Linux SSH免密码登陆
- linux ssh 免密码登陆
- [Linux]ssh免密码登陆
- linux ssh 免密码登陆
- linux ssh免密码登陆
- Linux ssh 免密码登陆
- ssh免密码登陆Linux
- Linux SSH免密码登陆
- linux ssh免密码登陆
- Linux ssh免密码登陆Linux服务器
- linux ssh设置免密码登陆
- Linux(Ubuntu)ssh免密码登陆
- Linux ssh免密码登陆配置
- linux配置SSH免密码登陆方法
- Linux集群间+SSH免密码登陆
- linux ssh key 免密码登陆
- linux中ssh免密码登陆
- Apache的windows版本启动报错自行分析方法
- 贝叶斯推理
- BZOJ 2144 跳跳棋
- CentOS7更改yum源
- 用spring的InitializingBean的afterPropertiesSet初始化
- ssh免密码登陆Linux
- 知道mac地址如何查看对方电脑名字
- app-config
- 端到端的OCR:基于CNN的实现
- 基于ant的jmeter自动化性能测试
- 响应者链(Responder Chain)
- 浅谈IQKeyboardManager第三方库的使用
- 利用caffe的python接口进行训练时遇到的问题
- org.springframework.web.multipart.MultipartException: The current request is not a multipart request