mozilla / ssh_scan

DEPRECATED - A prototype SSH configuration and policy scanner (Blog: https://mozilla.github.io/ssh_scan/)
Mozilla Public License 2.0
793 stars 105 forks source link

/usr/lib/ruby/2.5.0/open3.rb:199:in `spawn': No such file or directory - ssh-keyscan (Errno::ENOENT) #512

Closed ly1989abc closed 4 years ago

ly1989abc commented 4 years ago

Hi, I run a docker container with python3.7-slim and I install ssh_scan with command gem install ssh_scan, but when I run a command as ssh_scan -t 192.168.5.132, it returns like this:

root@8e6ba2fc5fdc:/usr/share/ssh_scan/bin# ./ssh_scan -t 192.168.5.132
#<Thread:0x000055e3ad94ed50@/usr/share/ssh_scan/lib/ssh_scan/scan_engine.rb:181 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
    6: from /usr/share/ssh_scan/lib/ssh_scan/scan_engine.rb:184:in `block (2 levels) in scan'
    5: from /usr/share/ssh_scan/lib/ssh_scan/scan_engine.rb:129:in `scan_target'
    4: from /usr/share/ssh_scan/lib/ssh_scan/scan_engine.rb:129:in `new'
    3: from /usr/share/ssh_scan/lib/ssh_scan/subprocess.rb:7:in `initialize'
    2: from /usr/lib/ruby/2.5.0/open3.rb:95:in `popen3'
    1: from /usr/lib/ruby/2.5.0/open3.rb:199:in `popen_run'
/usr/lib/ruby/2.5.0/open3.rb:199:in `spawn': No such file or directory - ssh-keyscan (Errno::ENOENT)
Traceback (most recent call last):
    6: from /usr/share/ssh_scan/lib/ssh_scan/scan_engine.rb:184:in `block (2 levels) in scan'
    5: from /usr/share/ssh_scan/lib/ssh_scan/scan_engine.rb:129:in `scan_target'
    4: from /usr/share/ssh_scan/lib/ssh_scan/scan_engine.rb:129:in `new'
    3: from /usr/share/ssh_scan/lib/ssh_scan/subprocess.rb:7:in `initialize'
    2: from /usr/lib/ruby/2.5.0/open3.rb:95:in `popen3'
    1: from /usr/lib/ruby/2.5.0/open3.rb:199:in `popen_run'
/usr/lib/ruby/2.5.0/open3.rb:199:in `spawn': No such file or directory - ssh-keyscan (Errno::ENOENT)

So I try the third way to install ssh_scan, git clone the source code and bundle install. But It returns the same result. Please help, thanks!

ly1989abc commented 4 years ago

I find that ssh libraries need to be installed firstly, with command apt-get install ssh. This issue can be closed. Thanks anyway.