-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Fix extra characters in print and merge docs for ssh_login/ssh_login_pubkey #20847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix extra characters in print and merge docs for ssh_login/ssh_login_pubkey #20847
Conversation
2a0da41 to
2867729
Compare
smcintyre-r7
left a comment
There was a problem hiding this 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) >
The requested change has been implemented 👍
Release NotesThis updates the |
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