Re: nmap-7.60 on Mac OS X - ssh-publickey-acceptance not working
Daniel Miller <[email protected]>
| Newsgroups | gmane.comp.security.nmap.devel |
|---|---|
| Message-ID | <CABmvJnOKJguQY2gHndFrm18Jpdshtf5A7Vt9iKED4gPPo3bJxg@mail.gmail.com> |
As we determined today on IRC, the private key file was passphrase-protected. It is a shortcoming of the current libssh2 bindings that we do not return any sort of error information after a failure. In the meantime, I've just added the ability to supply passphrases in the script-args for ssh-publickey-acceptance in r36982. Hopefully we'll be able to get error reporting added soon. Dan On Thu, Sep 7, 2017 at 2:40 PM, Ionreflex <[email protected]> wrote: > Hi Dev, > > I've run into an error running NSE script "ssh-publickey-acceptance" on > Mac OS X (El Capitan 10.11.6); at first I had the problem described in > https://github.com/nmap/nmap/issues/955, but I had the reflex to search > for it before posting. Nevertheless, even running the command from > /usr/local/share/nmap my key failed to authenticate : > > /> ssh -vv -l ionreflex -p 2222 random.null.net > ... > debug1: Offering RSA public key: /Users/ionreflex/.ssh/id_rsa > debug2: we sent a publickey packet, wait for reply > debug1: Server accepts key: pkalg ssh-rsa blen 111 > debug2: input_userauth_pk_ok: fp SHA256:493efcefb884d6b1d7c39ae3a05880 > 5963b8c53e > debug1: Authentication succeeded (publickey). > > /> sudo nmap -d --script +ssh-publickey-acceptance --script-args > "ssh.usernames={'root', 'ionreflex'}, ssh.privatekeys={'/Users/ionreflex/.ssh/id_rsa'}" > -p 2222 random.null.net > ... > NSE: Using Lua 5.3. > NSE: Arguments from CLI: ssh.usernames={'root', 'ionreflex'}, > ssh.privatekeys={'/Users/ionreflex/.ssh/id_rsa'} > NSE: Arguments parsed: ssh.usernames={'root', 'ionreflex'}, > ssh.privatekeys={'/Users/ionreflex/.ssh/id_rsa'} > NSE: Loaded 1 scripts for scanning. > ... > NSE: [ssh-publickey-acceptance 100.64.0.1:2222] Checking key: > /Users/ionreflex/.ssh/id_rsa for user ionreflex > userdata: 0x00e0fd0a > ionreflex > /Users/ionreflex/.ssh/id_rsa > NSE: [ssh-publickey-acceptance 100.64.0.1:2222] Failed to authenticate > NSE: Finished ssh-publickey-acceptance against random.null.net ( > 100.64.0.1:2222). > Completed NSE at 15:15, 1.57s elapsed > > I've installed Nmap using the package available at the download page : > https://nmap.org/dist/nmap-7.60.dmg > > Lemme know if you need more info or if I can help with anything! > > > > [ ^ ] > > _______________________________________________ > Sent through the dev mailing list > https://nmap.org/mailman/listinfo/dev > Archived at http://seclists.org/nmap-dev/ > _______________________________________________ Sent through the dev mailing list https://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/