老忘记,shell还是菜鸟级别,问了阿干,放在这儿备忘
#!/bin/bash
sshpass=`which sshpass`
if [ -z "$sshpass" ];then
ssh guolin.zhuanggl@172.16.20.162
else
read -p "input 6 number:" -n 6 pwd
sshpass -p yourpwd$pwd ssh guolin.zhuanggl@172.16.20.162
fi
老忘记,shell还是菜鸟级别,问了阿干,放在这儿备忘
#!/bin/bash
sshpass=`which sshpass`
if [ -z "$sshpass" ];then
ssh guolin.zhuanggl@172.16.20.162
else
read -p "input 6 number:" -n 6 pwd
sshpass -p yourpwd$pwd ssh guolin.zhuanggl@172.16.20.162
fi