-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Here is a minimum reproducible command (fill in INSTANCE_ID and IP_ADDRESS). This command is something Ansible uses to test SSH connections (this works when using the ssh
binary instead):
mssh \
-t ${INSTANCE_ID} \
-l ubuntu \
${IP_ADDRESS} \
'/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo ~/.ansible/tmp `"&& mkdir "` echo ~/.ansible/tmp/ansible-tmp-1623369896.6943882-14170-58937873873026 `" && echo ansible-tmp-1623369896.6943882-14170-58937873873026="` echo ~/.ansible/tmp/ansible-tmp-1623369896.6943882-14170-58937873873026 `" ) && sleep 0'"'"''
Output:
bash: -c: line 0: syntax error near unexpected token `('
bash: -c: line 0: `/bin/sh -c ( umask 77 && mkdir -p "` echo ~/.ansible/tmp `"&& mkdir "` echo ~/.ansible/tmp/ansible-tmp-1623369896.6943882-14170-58937873873026 `" && echo ansible-tmp-1623369896.6943882-14170-58937873873026="` echo ~/.ansible/tmp/ansible-tmp-1623369896.6943882-14170-58937873873026 `" ) && sleep 0'
With the -d
flag we see the SSH command:
2021-06-10 20:14:24,264 - EC2InstanceConnect - DEBUG - Generated command: ssh -o "IdentitiesOnly=yes" -i /tmp/tmp2jdzw7dw -l ubuntu ubuntu@10.0.2.26 /bin/sh -c '( umask 77 && mkdir -p "` echo ~/.ansible/tmp `"&& mkdir "` echo ~/.ansible/tmp/ansible-tmp-1623369896.6943882-14170-58937873873026 `" && echo ansible-tmp-1623369896.6943882-14170-58937873873026="` echo ~/.ansible/tmp/ansible-tmp-1623369896.6943882-14170-58937873873026 `" ) && sleep 0'
Metadata
Metadata
Assignees
Labels
No labels