Skip to content

Commit 73022eb

Browse files
committed
add KeepAlive configuration
1 parent b59f432 commit 73022eb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

VaderShell.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,14 @@ c4_node() {
4747
read -p "Enter SSH user: " username
4848
read -p "Enter Node ID: " device_id
4949
local ip_suffix=$((100 + device_id - 1))
50-
local ssh_command="sudo ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -tt -i $DATACENTER_GW_SSH_KEY_PATH krit@$DATACENTER_GW_IP \"ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $username@$DATACENTER_BASE_IP$ip_suffix\""
50+
local ssh_command="sudo ssh -tt \
51+
-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
52+
-o ServerAliveInterval=30 -o ServerAliveCountMax=5 -o TCPKeepAlive=yes \
53+
-i \"$DATACENTER_GW_SSH_KEY_PATH\" krit@$DATACENTER_GW_IP \
54+
\"ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
55+
-o ServerAliveInterval=30 -o ServerAliveCountMax=5 -o TCPKeepAlive=yes \
56+
$username@${DATACENTER_BASE_IP}${ip_suffix}\""
57+
5158
eval "$ssh_command"
5259
}
5360

0 commit comments

Comments
 (0)