共计 602 个字符,预计需要花费 2 分钟才能阅读完成。
RT 每个机子一个密钥批量控制太麻烦了 |
网友回复:
注册 : 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
tnr: 为什么不行?
yailone1: 当然可以
huanx: 善用搜索,这是可行的
wellknown: #编辑 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
索罗斯 : dd 就行
xinmang: 你发工单问问,看看客服怎么回复
正文完