网友 tnr 说:
RT 每个机子一个密钥批量控制太麻烦了
网友 yailone1 说:
sudo -i
echo **ot:要修改的密码 |sudo chpa**wd **ot
sudo sed -i ‘s/^.*PermitRootLogin.*/PermitRootLogin yes/g’ /etc/**h/**hd_config;
sudo sed -i ‘s/^.*Pa**wordAuthentication.*/Pa**wordAuthentication yes/g’ /etc/**h/**hd_config;
sudo ******* **hd restart
网友 wellknown 说:
为什么不行?
网友 索罗斯 说:
当然可以
网友 xinmang 说:
善用搜索,这是可行的
网友 会呼吸的痛 说:
#编辑cloud.cfg
vim /etc/cloud/cloud.cfg
#在最后加入以下代码
#!/bin/bash
echo **ot:你的密码 |sudo chpa**wd **ot
sudo sed -i ‘s/^#\?PermitRootLogin.*/PermitRootLogin yes/g’ /etc/**h/**hd_config;
sudo sed -i ‘s/^#\?Pa**wordAuthentication.*/Pa**wordAuthentication yes/g’ /etc/**h/**hd_config;
sudo ******* **hd restart
网友 william 说:
dd就行
网友 绿岛小夜曲 说:
你发工单问问,看看**怎么回复
贝壳主机网
