read -p "input number: " num
case "$num" in
1) ssh lx@$webserver
;;
2) ssh lx@$mysql
;;
*) echo "error"
;;
esac
done
修改lx .bash_profile或者bashrc等,让sh文件开机执行
ssh生成密钥
[lixin@lx ~]$ ssh-keygen
[lixin@lx ~]$ ssh-copy-id 192.168.117.101
原文地址:http://blog.51cto.com/13620507/2126139