All important information is stored in sshdefaultscan.log:

2015-06-05 22:07:09,432 - sshdefaultscan - INFO - Logged in with root:root in 14.25s
2015-06-05 22:08:13,660 - sshdefaultscan - INFO - Logged in with root:root in 13.99s
2015-06-08 21:19:46,295 - sshdefaultscan - INFO - Logged in with root:root in 14.26s

Batch mode

If you want to combine sshdefaultscan with other tools or make reports, you can use the --batch option. When running in batch mode, sshdefaultscan will print results to stdout and will suppress logging in the terminal (logging into file will not be disabled by this option).


$ python sshdefaultscan.py --batch 10.0.1-254.1-254

Use it with other tools, let’s see the latency with this hosts using ping:

$ python sshdefaultscan.py --batch | xargs -n 1 ping -c 1 | grep icmp_
64 bytes from icmp_seq=1 ttl=50 time=24 ms
64 bytes from icmp_seq=1 ttl=50 time=26 ms

Get hostname from an IP address using host:

$ python sshdefaultscan.py --batch | xargs -n 1 host domain name pointer ROUTER. domain name pointer hostA. domain name pointer android-67d82275b133e285


Sometime having only the hostname is not enough and a custom output is needed. When using --batch-template option a custom template can be set.

For example, let’s export the scan results to a CSV file:

$ python sshdefaultscan.py --batch-template "{host},{username},{password}" > scan.csv

The template uses Python’s string.format() with this parameters:

  • host
  • username
  • password

There is no need to use --batch when --batch-template is used, sshdefaultscan will assume that you want to run in batch mode.