Skip to content

Conversation

@dwelch-r7
Copy link
Contributor

Resolves #20795 and Resolves #20794

Merges the docs for the ssh_login modules post merge and fixes up a typo that was printing extra characters to the screen when printing out the private key

h00die
h00die previously requested changes Jan 6, 2026
@smcintyre-r7 smcintyre-r7 self-assigned this Jan 6, 2026
@github-project-automation github-project-automation bot moved this to Waiting on Contributor in Metasploit Kanban Jan 6, 2026
@dwelch-r7 dwelch-r7 force-pushed the fix-ssh-login-print-and-docs branch from 2a0da41 to 2867729 Compare January 8, 2026 13:57
Copy link
Contributor

@smcintyre-r7 smcintyre-r7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, thanks @dwelch-r7! I confirmed this fixes both issues that it calls out as fixing. While testing I did identify a third issue but I'll open a separate ticket for that.

msf auxiliary(scanner/ssh/ssh_login) > run
[*] 192.168.159.128:22    - Starting bruteforce
[*] 192.168.159.128:22 SSH - Testing Cleartext Keys
[+] 192.168.159.128:22    - Success: 'uid=1000(smcintyre) gid=1000(smcintyre) groups=1000(smcintyre),10(wheel),967(wireshark) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 Linux fedora 6.17.12-300.fc43.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Dec 13 05:06:24 UTC 2025 x86_64 GNU/Linux '
[*] SSH session 4 opened (192.168.159.128:40773 -> 192.168.159.128:22) at 2026-01-08 16:14:35 -0500
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf auxiliary(scanner/ssh/ssh_login) > run USERNAME=git RHOSTS=github.com
[*] 140.82.113.4:22       - Starting bruteforce
[*] 140.82.113.4:22 SSH - Testing Cleartext Keys
[+] 140.82.113.4:22       - Success: 'Invalid command: id    You appear to be using ssh to clone a git:// URL.   Make sure your core.gitProxy config option and the   GIT_PROXY_COMMAND environment variable are NOT set. Invalid command: help ?      You appear to be using ssh to clone a git:// URL.   Make sure your core.gitProxy config option and the   GIT_PROXY_COMMAND environment variable are NOT set. '
[!] 140.82.113.4:22 - LOGIN FAILED: {:private_data=>"-----BEGIN OPENSSH PRIVATE KEY-----\nNOPENOPENOPE=\n-----END OPENSSH PRIVATE KEY-----\n", :private_type=>:ssh_key, :username=>"git", :realm_key=>nil, :realm_value=>nil} - Unhandled error - scan may not produce correct results: Unknown platform: unknown - ["/home/smcintyre/Repositories/metasploit-framework.pr/lib/msf/base/sessions/ssh_command_shell_bind.rb:246:in `bootstrap'", "/home/smcintyre/Repositories/metasploit-framework.pr/lib/msf/core/auxiliary/command_shell.rb:53:in `start_session'", "/home/smcintyre/Repositories/metasploit-framework.pr/lib/msf/core/auxiliary/report_summary.rb:123:in `start_session'", "/home/smcintyre/Repositories/metasploit-framework.pr/modules/auxiliary/scanner/ssh/ssh_login.rb:92:in `session_setup'", "/home/smcintyre/Repositories/metasploit-framework.pr/modules/auxiliary/scanner/ssh/ssh_login.rb:279:in `block in do_login_pubkey'", "/home/smcintyre/Repositories/metasploit-framework.pr/lib/metasploit/framework/login_scanner/base.rb:237:in `block in scan!'", "/home/smcintyre/Repositories/metasploit-framework.pr/lib/metasploit/framework/login_scanner/base.rb:182:in `block in each_credential'", "/home/smcintyre/Repositories/metasploit-framework.pr/lib/metasploit/framework/key_collection.rb:94:in `block in each'", "/home/smcintyre/Repositories/metasploit-framework.pr/lib/metasploit/framework/key_collection.rb:101:in `block in each_key'", "/home/smcintyre/.rvm/rubies/ruby-3.3.8/lib/ruby/3.3.0/set.rb:501:in `each_key'", "/home/smcintyre/.rvm/rubies/ruby-3.3.8/lib/ruby/3.3.0/set.rb:501:in `each'", "/home/smcintyre/Repositories/metasploit-framework.pr/lib/metasploit/framework/key_collection.rb:100:in `each_key'", "/home/smcintyre/Repositories/metasploit-framework.pr/lib/metasploit/framework/key_collection.rb:93:in `each'", "/home/smcintyre/Repositories/metasploit-framework.pr/lib/metasploit/framework/login_scanner/base.rb:144:in `each_credential'", "/home/smcintyre/Repositories/metasploit-framework.pr/lib/metasploit/framework/login_scanner/base.rb:208:in `scan!'", "/home/smcintyre/Repositories/metasploit-framework.pr/modules/auxiliary/scanner/ssh/ssh_login.rb:259:in `do_login_pubkey'", "/home/smcintyre/Repositories/metasploit-framework.pr/modules/auxiliary/scanner/ssh/ssh_login.rb:137:in `run_host'", "/home/smcintyre/Repositories/metasploit-framework.pr/lib/msf/core/auxiliary/scanner.rb:116:in `block (2 levels) in run'", "/home/smcintyre/Repositories/metasploit-framework.pr/lib/msf/core/thread_manager.rb:105:in `block in spawn'"]
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf auxiliary(scanner/ssh/ssh_login) >

@smcintyre-r7 smcintyre-r7 dismissed h00die’s stale review January 8, 2026 21:17

The requested change has been implemented 👍

@smcintyre-r7 smcintyre-r7 merged commit da89d98 into rapid7:master Jan 8, 2026
18 checks passed
@github-project-automation github-project-automation bot moved this from Waiting on Contributor to Done in Metasploit Kanban Jan 8, 2026
@smcintyre-r7 smcintyre-r7 added module bug rn-fix release notes fix labels Jan 8, 2026
@smcintyre-r7
Copy link
Contributor

Release Notes

This updates the auxiliary/scanner/ssh/ssh_login module to remove stale documentation, remove unnecessary characters that were printed in the output and update the correct documentation with the new information about key usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug module rn-fix release notes fix

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

ssh_login_pubkey docs needc to be removed ssh_login printing extraneous characters

3 participants