sshuttle icon indicating copy to clipboard operation
sshuttle copied to clipboard

Fix splitting of multi-word arguments

Open F30 opened this issue 9 years ago • 0 comments

I tried setting a multi-word SSH option through ssh -o and sshuttle -e. This didn't work because regardless of the quoting, sshuttle always split the option into multiple arguments and made the quotes become a literal part of the args.

The problem turned out to be caused by shuttle always splitting the arguments at spaces, which makes it practically impossible to have multi-word arguments.

This patch solves the issue by using Python's shlex module, which splits arguments like a shell and e.g. respects quotes. I found one more similar line in the sshuttle code and fixed that one as well.

F30 avatar Sep 27 '16 12:09 F30