From 3b5140fb8523db1918140b180cacb947abce95aa Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Tue, 11 Oct 2016 09:17:11 +1030 Subject: [PATCH] Use shlex.split so we can escape spaces if necessary (eg ProxyCommand) --- sshuttle/ssh.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sshuttle/ssh.py b/sshuttle/ssh.py index 7691c80..1ba7c46 100644 --- a/sshuttle/ssh.py +++ b/sshuttle/ssh.py @@ -1,6 +1,7 @@ import sys import os import re +import shlex import socket import zlib import imp @@ -102,7 +103,7 @@ def connect(ssh_cmd, rhostport, python, stderr, options): argv = [sys.argv[1], '-c', pyscript] else: if ssh_cmd: - sshl = ssh_cmd.split(' ') + sshl = shlex.split(ssh_cmd) else: sshl = ['ssh'] if python: