mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-04-22 10:18:59 +02:00
ssh.py: use 'exec sshuttle' to get rid of the extra sh process.
This commit is contained in:
parent
bfd506dcdc
commit
ea12048418
2
ssh.py
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user