#scp -P22 /home/test.txt root@192.168.1.1:/home/ 本地文件test.txt 复制到远程服务器 #scp -P22 root@192.168.1.11:/home/test.txt /home/ 远程文件text.txt复制到本地home目录 ps: -P22&n
#!/bin/bash #vim ip.txt server ip ip_array=$(cat /tmp/ip.txt) user="root" passwd="password" remote_cmd="/tmp/test.sh" port=6122 for ip in ${ip_array[*]} do ssh
!/bin/bash #vim ip.txt server ip ip_array=$(cat /tmp/ip.txt) for ip in ${ip_array[*]} do scp -P6122 /tmp/test.sh root@$ip:/tmp/ done
#!/bin/bash #备份所需要配置的文件 cp /etc/login.defs /etc/login.defs.bak cp /etc/profile /etc/profile.bak cp /etc/pam.d/common-password /etc/pam.d/common-password.bak sed -i&n
#! /usr/bin/expect set ip_array 192.168.11. ###### 网段前缀 set username root set timeout 30 #foreach ip {81 82&nb
#!/bin/bash # The is script backup /etc directory! # Author: zhangjun (E-MAILL: bard_zhang@foxmail.com) date=$(date +%y%m%d) size=$(du -s
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号