diff options
author | TJ Kolev <tjkolev@gmail.com> | 2023-02-03 15:45:21 -0600 |
---|---|---|
committer | TJ Kolev <tjkolev@gmail.com> | 2023-02-03 15:45:21 -0600 |
commit | 5830eb548ef7c5f3711692550243ddf4ada2992f (patch) | |
tree | a4a0345d828b0401f9f25cd4e7eb79b7fd6b2bce | |
parent | f33d4d1a914f239dced52b48e2709e23191271a2 (diff) | |
download | dropbear-5830eb548ef7c5f3711692550243ddf4ada2992f.tar.gz |
Dropbear SSH test
On my local machine the dbclient is timing out unable to connect to the spawned
dropbear service. It is waiting for me to provide password. Even if I do so
it doesn't like it. Must be missing something.
What I found out is invalid -p value when launching dropbear service. It passes
an IP address in place of a port.
tjk :)
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | test/test_dropbear.py | 7 |
2 files changed, 8 insertions, 3 deletions
@@ -27,5 +27,7 @@ Makefile tags .pytest* *.pyc -/test/venv +/test/venv/ +/test/init/ +/test/fakekey .vscode/
\ No newline at end of file diff --git a/test/test_dropbear.py b/test/test_dropbear.py index 77d1774..18737f5 100644 --- a/test/test_dropbear.py +++ b/test/test_dropbear.py @@ -21,11 +21,13 @@ def dropbear(request): # split so that "dropbearmulti dropbear" works args = opt.dropbear.split() + [ - "-p", LOCALADDR, # bind locally only + "-p", LOCALADDR + ":" + opt.port, # bind locally only "-r", opt.hostkey, - "-p", opt.port, +# "-p", opt.port, "-F", "-E", ] + print("subprocess args: ", args) + p = subprocess.Popen(args, stderr=subprocess.PIPE, text=True) # Wait until it has started listening for l in p.stderr: @@ -49,6 +51,7 @@ def dbclient(request, *args, **kwargs): if opt.user: base_args.extend(['-l', opt.user]) full_args = base_args + list(args) + print("subprocess args: ", full_args) bg = kwargs.get("background") if "background" in kwargs: del kwargs["background"] |