SSH Client as a Quick and Dirty Port Scanner

by on Jul.22, 2022, under Posts

Since the ssh client is pretty ubiquitous and has been included with Windows 10 installations for the past couple years, I’ve discovered it can be a useful tcp port scanner if you use the verbose flag:

For Windows:

ssh -p 80 google.com -v 2>&1 | findstr Connect

ssh -p 80 -o ConnectTimeout=1 www.google.com -v 2>&1 | findstr Connect
debug1: Connecting to www.google.com [142.250.191.228] port 80.
debug1: Connection established.
kex_exchange_identification: Connection closed by remote host

As for your *nix systems, just use grep instead of findstr. I hope someone else finds this useful!

 

:, , , , , , , ,

Leave a Reply

Please leave these two fields as-is:

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!