File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
+
3
4
AUTH_METHOD=" $1 "
4
5
ACTION=" $2 "
5
6
@@ -141,7 +142,7 @@ deploy_key_server() {
141
142
# 读取本机环境变量
142
143
EXPORTED_ENV_VARS=$( export_env_vars)
143
144
144
- ssh -o StrictHostKeyChecking=no " $SERVER_USER @$SERVER_HOST " \
145
+ ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 " $SERVER_USER @$SERVER_HOST " \
145
146
" $EXPORTED_ENV_VARS
146
147
$( typeset -f) ; $action_func "
147
148
}
@@ -154,7 +155,7 @@ deploy_pwd_server() {
154
155
# 读取本机环境变量
155
156
EXPORTED_ENV_VARS=$( export_env_vars)
156
157
157
- sshpass -p " $SERVER_PASSWORD " ssh -t -o StrictHostKeyChecking=no \
158
+ sshpass -p " $SERVER_PASSWORD " ssh -t -o StrictHostKeyChecking=no -o ConnectTimeout=10 \
158
159
" $SERVER_USER @$SERVER_HOST " \
159
160
" $EXPORTED_ENV_VARS
160
161
$( typeset -f) ; $action_func "
You can’t perform that action at this time.
0 commit comments