(feat) enable socat reuseaddr for ssm tunneling command
This commit is contained in:
@ -26,7 +26,7 @@ function ssm_tunnel --description 'access private AWS ressources via Bastion Hos
|
|||||||
|
|
||||||
# make sure jq is installed
|
# make sure jq is installed
|
||||||
# Start socat on the remote server
|
# Start socat on the remote server
|
||||||
set CMD "'sudo socat TCP4-LISTEN:$REM_PORT,fork TCP4:$REMOTE_HOST'"
|
set CMD "'sudo socat TCP4-LISTEN:$REM_PORT,reuseaddr,fork TCP4:$REMOTE_HOST'"
|
||||||
set CMD_INVOC_ID (aws ssm send-command --instance-ids $INSTANCE_ID \
|
set CMD_INVOC_ID (aws ssm send-command --instance-ids $INSTANCE_ID \
|
||||||
--document-name 'AWS-RunShellScript' \
|
--document-name 'AWS-RunShellScript' \
|
||||||
--parameters "commands=$CMD,executionTimeout=$TIMEOUT" --output json | jq -r '.Command.CommandId')
|
--parameters "commands=$CMD,executionTimeout=$TIMEOUT" --output json | jq -r '.Command.CommandId')
|
||||||
|
|||||||
Reference in New Issue
Block a user