Commit ea120484 authored by Avery Pennarun's avatar Avery Pennarun

ssh.py: use 'exec sshuttle' to get rid of the extra sh process.

parent bfd506dc
...@@ -18,7 +18,7 @@ def connect(rhost): ...@@ -18,7 +18,7 @@ def connect(rhost):
# stuff here. # stuff here.
escapedir = re.sub(r'([^\w/])', r'\\\\\\\1', nicedir) escapedir = re.sub(r'([^\w/])', r'\\\\\\\1', nicedir)
cmd = r""" cmd = r"""
sh -c PATH=%s:'$PATH sshuttle --server' sh -c PATH=%s:'$PATH exec sshuttle --server'
""" % (escapedir,) """ % (escapedir,)
argv = ['ssh', '-v', rhost, '--', cmd.strip()] argv = ['ssh', '-v', rhost, '--', cmd.strip()]
print repr(argv) print repr(argv)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment