ubuntu(16.04) 系统相互在root下免密ssh
来源:互联网 发布:判断微信浏览器 js 编辑:程序博客网 时间:2024/06/07 17:43
1 保证几台机器能够在root下能ssh
首先是要进入登陆账号设置root密码 sudo passwd root(root 初始密码位空, 可以用sudo -i 或者 sudo -s -H进入)
再是安装openssh(apt-get install openssh-server -y), 并且设置其让root可以ssh("/etc/ssh/sshd_config", 注释#PermitRootLogin prohibit-password
添加 PermitRootLogin yes) , 再重启ssh service ssh restart
最后看防火墙是不是阻止了22端口, 有的话需要添加22端口 (ufw allow 22), 再重启 ufw reload, ufw enable
2 生成公约并copy到相应的机器上
在每台机器上运行: cd /root/.ssh ssh-keygen -t rsa (回车到底) run ssh-copy-id -i id_rsa.pub root@host
到此不出意外就可以了 .
3 问题:
在第二步的时候可能回遇到如下的问题: 这是需要运行ssh-keygen -f "/root/.ssh/known_hosts" -R 192.168.56.110 , 然后再执行第二部
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 ECDSA key sent by the remote host is
SHA256:+XEkEDA0VKgc5sULvED4/xqS5ZXQVdKRI1GBVftt0cw.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:2
remove with:
ssh-keygen -f "/root/.ssh/known_hosts" -R 192.168.56.110
ECDSA host key for 192.168.56.110 has changed and you have requested strict checking.
Host key verification failed.
我在此之前还发现我的ubuntu虚拟机不能root直接登陆, 后来就把/etc/lightdm/lightdm.conf 两面的 autologin-user 这位root就可以了 autologin-user=root
- ubuntu(16.04) 系统相互在root下免密ssh
- ubuntu root 开启 ssh
- 如何在Ubuntu上让root帐号可以登录SSH
- win7 Ubuntu SSH相互连接
- ubuntu 设置root登录ssh
- Ubuntu SSH 开启 Root 远程登陆
- Ubuntu 17.04 SSH root Login
- Ubuntu 16.04使用root 帐号开启 SSH 登录
- ubuntu系统root登录
- ubuntu中root和普通用户相互切换
- ubuntu中root和普通用户相互切换
- ubuntu中root和普通用户相互切换
- ubuntu中root和普通用户相互切换
- 腾讯云Ubuntu系统获取root权限并使用ssh连接
- ubuntu 16.04 启用root用户方法 ,并可以ssh远程root用户登录
- Ubuntu 在root 权限下SSH Permission denied, please try again 问题
- 在Ubuntu 16.04 中搭建SSH服务器
- ubuntu ssh 默认root密码问题
- Java day8
- 策略模式
- Java 常用工具类 Collections 源码分析
- OpenShift Origin v3.7 端口转发
- PAT 甲级 1129. Recommendation System (25)
- ubuntu(16.04) 系统相互在root下免密ssh
- android的传参
- PAT 甲级 1130. Infix Expression (25)
- 工作总结
- CSDN-MARKDOWN flowchart.js 流程图详解
- Webpack中 publicPath 跟 path 的区别,个人理解
- CMake找不到opencv库解决办法
- 自动生成简单数学题的小程序范例
- Python练习题:类与对象