Skip to content

Catch errors when connecting to SSH servers in ssh-publickey-acceptance.nse. Fixes #1014 - #2616

Closed
MegaManSec wants to merge 4 commits into
nmap:masterfrom
MegaManSec:ssh
Closed

Catch errors when connecting to SSH servers in ssh-publickey-acceptance.nse. Fixes #1014#2616
MegaManSec wants to merge 4 commits into
nmap:masterfrom
MegaManSec:ssh

Conversation

@MegaManSec

@MegaManSec MegaManSec commented Mar 5, 2023

Copy link
Copy Markdown

ssh-publickey-acceptance.nse attempts to connect to remote SSH servers, and if it cannot connect, it tries a total of three times per host. However, connect() raises an exception, thus bailing completely on the host. connect_plist() returns the status however, and the re-attempts will occur.

I have also changed the verbose message about acepted keys to include the host. I have also included the privatekey name in case of failure to use the key.

…ce.nse

ssh-publickey-acceptance.nse attempts to connect to remote SSH servers,
and if it cannot connect, it tries a total of three times per host.
However, connect() raises an exception, thus bailing completely on the
host. connect_plist() returns the status however, and the re-attempts
will occur.
@MegaManSec MegaManSec changed the title Catch errors when connecting to SSH servers in ssh-publickey-acceptance.nse Catch errors when connecting to SSH servers in ssh-publickey-acceptance.nse. Fixes #1014 Mar 5, 2023
@MegaManSec

Copy link
Copy Markdown
Author

This fixes #1014 and was probably picked up in #1227 too

@dmiller-nmap

Copy link
Copy Markdown

Looks great. I combined this with some similar changes to the other SSH scripts and credited you in the changelog. The commit will close this PR when it syncs.

@nmap-bot nmap-bot closed this in f1325d7 Oct 4, 2024
@MegaManSec

Copy link
Copy Markdown
Author

Great, thanks! Any chance of taking a quick look at #2646 and #2647 too?

@MegaManSec
MegaManSec deleted the ssh branch October 5, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants