summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian May <brian@linuxpenguins.xyz>2020-06-11 06:15:19 +1000
committerGitHub <noreply@github.com>2020-06-11 06:15:19 +1000
commit16b462880b1dd4d4cc542002f433f75de3a6b396 (patch)
tree2d827a1d471d91d25f99f49347ba8fd68e9fdfa0
parent7d998f6d425ceb68f6d5f006e4d0c649fbc93d32 (diff)
parent500aa65693412879f31b63fb6000e5bb7b2245c4 (diff)
Merge pull request #460 from alekseymykhailov/fix_connection
fix connection with @ sign in username
-rw-r--r--sshuttle/ssh.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/sshuttle/ssh.py b/sshuttle/ssh.py
index 5c968f0..6f6b380 100644
--- a/sshuttle/ssh.py
+++ b/sshuttle/ssh.py
@@ -76,9 +76,8 @@ def parse_hostport(rhostport):
if "@" in host:
# split username (and possible password) from the host[:port]
- username, host = host.split("@")
+ username, host = host.rsplit("@", 1)
# Fix #410 bad username error detect
- # username cannot contain an @ sign in this scenario
if ":" in username:
# this will even allow for the username to be empty
username, password = username.split(":")