1
1
mirror of https://github.com/sshuttle/sshuttle.git synced 2025-07-08 10:37:25 +02:00

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

This commit is contained in:
Avery Pennarun
2010-05-02 01:30:40 -04:00
parent bfd506dcdc
commit ea12048418

2
ssh.py

@ -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)