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
View File

@ -18,7 +18,7 @@ def connect(rhost):
# stuff here.
escapedir = re.sub(r'([^\w/])', r'\\\\\\\1', nicedir)
cmd = r"""
sh -c PATH=%s:'$PATH sshuttle --server'
sh -c PATH=%s:'$PATH exec sshuttle --server'
""" % (escapedir,)
argv = ['ssh', '-v', rhost, '--', cmd.strip()]
print repr(argv)