jtesta / ssh-audit

SSH server & client security auditing (banner, key exchange, encryption, mac, compression, compatibility, security, etc)
MIT License
3.43k stars 177 forks source link

Specifying port does not work #294

Closed compass-dexter closed 2 months ago

compass-dexter commented 2 months ago

Hello, while running ssh-audit on a non-standard port, I noticed that alternate port options is not respected:

# ssh-audit --port=5022 --targets=ips_acm.txt
[exception] cannot connect to 10.x.y.a port 22: timed out
--------------------------------------------------------------------------------

[exception] cannot connect to 10.x.y.b port 22: timed out

ssh-audit is installed through pipx:

# pipx list | grep ssh-audit
   package ssh-audit 3.3.0.dev0, installed using Python 3.11.9
    - ssh-audit
jtesta commented 2 months ago

On Thu, 2024-09-05 at 06:23 -0700, compass-dexter wrote:

ssh-audit --port=5022 --targets=ips_acm.txt

[exception] cannot connect to 10.x.y.a port 22: timed out

A workaround is to specify each target in the file with the format "host1:5022".

I suppose I can update the code to use the --port value as the default for all targets so this works as expected.

jtesta commented 2 months ago

I believe this is now fixed. Please test this if you can, and re-open the issue if you find the problem still unsolved.

Thanks for reporting!

compass-dexter commented 2 months ago

Yes this works, thanks a lot for your quick response!