Find file
Fetching contributors…
Cannot retrieve contributors at this time
148 lines (147 sloc) 3.9 KB
.\" $Id: scanhosts.1 44 2010-12-13 02:34:19Z jans $
.\" $URL: svn+ssh:// $
.\" This manual page was originally written by Jan Schaumann
.\" <> in February 2007.
.Dd November 24, 2015
.Nm scanhosts
.Nd run checkhosts against a large number of hosts
.Op Fl A Ar authmode
.Op Fl n Ar num
.Op Fl o Ar dir
.Op Fl p Ar script
.Op Fl s Ar suffix
.Fl f Ar file
.Fl r Ar script
utility is used to run
.Xr checkhosts 1
against a large number of hosts.
It is normally invoked via
.Xr autopw 1
.Xr scanslave 1 .
It splits the input and then invokes
.Xr checkhosts 1
on the individual files in the background, eventually waiting for them all to
It then invokes the optionally provided post-processing command, passing it the
name of the output directory as the single argument.
The following options are supported:
.Bl -tag -width A_authmode_
.It Fl A Ar authmode
Specify the authentication mode.
Valid options are "all", "password" and "pubkey".
This is passed on to the
.Xr checkhosts 1
.It Fl B
Do not background
.Xr checkhosts 1 Ns .
This option is required if the command run on the remote host invokes
.Xr sudo 8
(or does any other interactive prompting) and will necessarily result in a
significant performance decrease, since jobs no longer are executed in
parallel but sequentially.
.It Fl H
Do not use the headless user for ssh connections.
This is passed on to the
.Xr checkhosts 1
.It Fl I
Do not use IP addresses to ssh to.
This is passed on to the
.Xr checkhosts 1
.It Fl P
Do not try to ping the hosts.
This is passed on to the
.Xr checkhosts 1
.It Fl S
Do not check if sshd is listening on port 22 on the hosts.
This is passed on to the
.Xr checkhosts 1
.It Fl f Ar file
Take input from this file.
.Fl f Ar file
may be given.
The format of the file is exactly one host per line.
Lines starting with a # are treated as comments and ignored until the end of
the line.
.It Fl h
Print a usage message and exit.
.It Fl n Ar num
Split the input into this many files and thus run
.Ar num
instances of
.Xr checkhosts 1
in parallel.
If not specified,
will split input into files based on the input size.
.It Fl o Ar dir
Put the output files into
.Ar dir .
Per default, output is generated in TMPDIR.
.It Fl p Ar cmd
Invoke the specified command for post-processing of the output.
This command is passed as a single argument the directory where the output was
collected in.
.It Fl r Ar script
Specify the file that contains the script to run on the remote side.
Passed through to
.Xr checkhosts 1 .
.It Fl s Ar suffix
Use given suffix instead of default date for all output.
Output is generated in the directory "output" under the directory specified
.Fl o Ar dir .
In that directory, N subdirectories will be created (where N is the number of
files the input was split into), into which the
.Xr checkhosts 1
instance will generate output.
The following examples illustrate common usage of this tool.
This runs the scans without checking if a host pings, reads input from the
file /tmp/input, splits the input into 20 files and puts the output into
the directory ./output/20070227 under the current working directory:
.Bd -literal -offset indent
$ autopw scanhosts -P -n 20 -f /tmp/input -o ./output/20070227 \\
-r /tmp/
.Ex -std
.Xr autopw 1 ,
.Xr checkhosts 1 ,
.Xr scanslave 1 ,
.Xr scanmaster 1
utility was originally written by
.An Jan Schaumann
in January 2007.
It's original task was to check hosts if they were able to deal with the new
Daylight Saving Time instituted in the USA in 2007.
Please file bugs and feature requests via Jira under
\'Security Architecture\' (PSECARCH), Component