This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function proxy_off(){ | |
unset http_proxy | |
unset https_proxy | |
echo -e "已关闭代理" | |
} | |
function proxy_on() { | |
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com" | |
export http_proxy="http://127.0.0.1:8118" | |
export https_proxy=$http_proxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect -f | |
set user root | |
set host xxx.36.xxx.142 | |
set password xxxxxxxx | |
set timeout -1 | |
spawn ssh $user@$host | |
expect "*assword:*" | |
send "$password\r" | |
interact | |
expect eof |