Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

Can't fix this problem #429

Closed
mariobranco opened this issue Jan 26, 2018 · 4 comments
Closed

Can't fix this problem #429

mariobranco opened this issue Jan 26, 2018 · 4 comments

Comments

@mariobranco
Copy link

Command: ssh_scan -t [TARGET]
Output:
/var/lib/gems/2.3.0/gems/ssh_scan-0.0.32/lib/ssh_scan/scan_engine.rb:138:in scan_target': undefined method split' for nil:NilClass (NoMethodError)
from /var/lib/gems/2.3.0/gems/ssh_scan-0.0.32/lib/ssh_scan/scan_engine.rb:191:in `block (2 levels) in scan'

Can't find the solution for my problem.
Any tip please ?

@claudijd
Copy link
Contributor

@mariobranco you have to supply a target, like this...

$ ssh_scan -t sshscan.rubidus.com

If you have a specific example case, please let me know

@ondrejkelemen
Copy link

Hello @claudijd,

I encounter the same issue as was mentioned above when I specify some non-standard port, e.g.:

$ ssh_scan -t 192.168.2.219 -p 5022

Output after executing this command:

/var/lib/gems/2.3.0/gems/ssh_scan-0.0.32/lib/ssh_scan/scan_engine.rb:138:in scan_target': undefined method split' for nil:NilClass (NoMethodError)
from /var/lib/gems/2.3.0/gems/ssh_scan-0.0.32/lib/ssh_scan/scan_engine.rb:191:in `block (2 levels) in scan'

If I am not mistaken, the problem could be with ssh-keyscan in scan_engine.rb, line 127:

stdin, stdout, stderr, wait_thr = Open3.popen3('ssh-keyscan', '-t', 'rsa,dsa', target)

If other port is specified, ssh-keyscan ignores it and there is no output to parse.
I tried to resolve this, as can be seen bellow, and it seems to be working.

stdin, stdout, stderr, wait_thr = Open3.popen3('ssh-keyscan', '-t', 'rsa,dsa', '-p', port.to_s, target)

Thank you for looking into it.

jinankjain added a commit to jinankjain/ssh_scan that referenced this issue Feb 13, 2018
jinankjain added a commit that referenced this issue Feb 13, 2018
fixes #429: Add the missing port argument to ssh_keyscan
@claudijd
Copy link
Contributor

props to @jinankjain to beating me to the punch on this!

Also, thanks @ondrejkelemen and @mariobranco for reporting, I'll try to get a fixed release out today.

@claudijd
Copy link
Contributor

33 has been released to fix this => https://twitter.com/claudijd/status/963443576238723072

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants