Unable to specify ssh parameters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sshsplit |
Confirmed
|
High
|
Martin Eve | ||
Stable |
Confirmed
|
Undecided
|
Martin Eve |
Bug Description
I can see how this works with an ssh tunnel that has no password and uses the standard port (22). I need to specify several such parameters however. Perhaps I just missed something?
I tried putting these in the "process arguments" section, but that doesn't seem to work.
Specifically, I want to do this:
ssh -fN -p 2222 -D 1080 root@127.0.0.1
How can I specify to use 2222 as the ssh port and to login as root, which should prompt for a password? (These options are absolutely necessary for my ssh tunnel, -fN is not so important however).
When I put those arguments in "process arguments", sshsplit outputs:
Traceback (most recent call last):
File "/usr/bin/
listenhost, listenport)
File "/usr/bin/
self.listenport = int(listenport)
ValueError: invalid literal for int() with base 10: ''
Starting 5 SSH instances.
Started SSH on port 1081.
Launching ssh - f N - p 2 2 2 2 r o o t @ 1 2 7 . 0 . 0 . 1
Started SSH on port 1082.
Launching ssh - f N - p 2 2 2 2 r o o t @ 1 2 7 . 0 . 0 . 1
Launching ssh - f N - p 2 2 2 2 r o o t @ 1 2 7 . 0 . 0 . 1
Started SSH on port 1083.
Started SSH on port 1084.
Launching ssh - f N - p 2 2 2 2 r o o t @ 1 2 7 . 0 . 0 . 1
Started SSH on port 1085.
Launching ssh - f N - p 2 2 2 2 r o o t @ 1 2 7 . 0 . 0 . 1
Child process died.
Child process died.
Child process died.
Child process died.
Child process died.
I also tried typing the binary line as "ssh -p 2222 root@127.0.0.1" and leaving "listen host" blank:
Starting 5 SSH instances.
Started SSH on port 1081.
Launching ssh -p 2222 root@127.0.0.1 -ND 1081
Started SSH on portLaunching ssh -p 2222 root@127.0.0.1 -ND 1082
1082.
Started SSH on port 1083.
Launching ssh -p 2222 root@127.0.0.1 -ND 1083
Started SSH on port 1084.
Launching ssh -p 2222 root@127.0.0.1 -ND 1084
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/
self.run()
File "/usr/bin/
stderr=
File "/usr/lib/
errread, errwrite)
File "/usr/lib/
raise child_exception
OSError: [Errno 2] No such file or directory
Launching ssh -p 2222 root@127.0.0.1 -ND 1085 Started SSH on port 1085.
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/
self.run()
File "/usr/bin/
stderr=
File "/usr/lib/
errread, errwrite)
File "/usr/lib/
raise child_exception
OSError: [Errno 2] No such file or directory
Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/lib/
self.run()
File "/usr/bin/
stderr=
File "/usr/lib/
errread, errwrite)
File "/usr/lib/
raise child_exception
OSError: [Errno 2] No such file or directory
Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/
self.run()
File "/usr/bin/
stderr=
File "/usr/lib/
errread, errwrite)
File "/usr/lib/
raise child_exception
OSError: [Errno 2] No such file or directory
Exception in thread Thread-6:
Traceback (most recent call last):
File "/usr/lib/
self.run()
File "/usr/bin/
stderr=
File "/usr/lib/
errread, errwrite)
File "/usr/lib/
raise child_exception
OSError: [Errno 2] No such file or directory
I was expecting an ssh tunnel to be created on port 1080, but I don't see any output to that effect (shall I try -v on the command line?) and also, in each case sshsplit must be "kill -9" terminted. None of the ssh processes survive either, but I am not sure if that's because they die waiting for a password or sshsplit can't pass the arguments I specified, or boh.(..?)
Changed in sshsplit: | |
status: | New → Confirmed |
milestone: | none → 0.4 |
status: | Confirmed → Fix Committed |
importance: | Undecided → High |
Changed in sshsplit: | |
status: | Fix Committed → Fix Released |
Hi,
Many thanks for the report. This raises two, separate issues. (and alerted me to a third)
1.) You can do what you want with this syntax:
autossh -a "-p 2222" -s 1080 root@127.0.0.1
Note the quotes around the process arguments.
This does:
Process arguments: -p 2222
Start port: 1080 (will spawn ssh dynamic tunnels on 1080, 1081, 1082, 1083, 1084)
*However*: this brought to my attention a bug in the code that parses "-s", so that will be fixed in 0.4. (Also fixed in code)
2.) Using this method will prompt for your password. Just make sure not to pass the "-d" flag, because if it daemonizes it won't ask.
3.) Processess needing to be killed with -9 is on my todo list!