在环境变量中设
declare -x SSHPASS="密码"
sshpass -e ssh -o StrictHostKeyChecking=no 用户名@IP "free|grep Mem" > $tempfile
转载于:https://blog.51cto.com/zhouzhenxing/1741383
在环境变量中设
declare -x SSHPASS="密码"
sshpass -e ssh -o StrictHostKeyChecking=no 用户名@IP "free|grep Mem" > $tempfile
转载于:https://blog.51cto.com/zhouzhenxing/1741383