- 批量修改主机名
- 批量配置服务器免密码登录
脚本内容如下:
#!/bin/bash i=1 for group in `cat /home/group` do expect <注:需要把所有服务器的ip,写入到脚本中的/home/group文件中。
批量配置服务器免密码登录脚本一内容如下:
#!/bin/bash for group in `cat /home/group` do expect <脚本二内容如下:
#!/bin/bash i=1 for group in `cat /home/group` do expect <> /root/.ssh/authorized_keys let i+=1 done脚本三内容如下:
#!/bin/bash i=1 for group in `cat /home/group` do expect <注:需要把所有服务器的ip,写入到脚本中的/home/group文件中,按顺序执行脚本



