RT 每个机子一个密钥批量控制太麻烦了
热议
推荐楼 yailone1 昨天22:10
sudo -i
echo root:要修改的密码 |sudo chpasswd root
sudo sed -i 's/^.*PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sudo sed -i 's/^.*PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
sudo service sshd restart
2楼 wellknown 昨天22:07
为什么不行?
3楼 索罗斯 昨天22:08
当然可以
4楼 xinmang 昨天22:09
善用搜索,这是可行的
6楼 会呼吸的痛 昨天22:11
#编辑cloud.cfg
vim /etc/cloud/cloud.cfg
#在最后加入以下代码
#!/bin/bash
echo root:你的密码 |sudo chpasswd root
sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
sudo service sshd restart
7楼 william 昨天22:11
dd就行
8楼 绿岛小夜曲 昨天22:12
你发工单问问,看看客服怎么回复
9楼 wljyrzr 17分钟前
mark一下
10楼 louiejordan 15分钟前
其实你可以所有机器用一套密钥
申明:本文内容由网友收集分享,仅供学习参考使用。如文中内容侵犯到您的利益,请在文章下方留言,本站会第一时间进行处理。
谷姐靓号网



评论前必须登录!
立即登录 注册