Fix Metasploit error “The following options failed to validate: RHOSTS”

 

Fix Metasploit error “The following options failed to validate: RHOSTS”

 

The Metasploit Project is a computer security project that provides information about security vulnerabilities and aids in penetration testing and IDS signature development.

Its best-known sub-project is the open source Metasploit Framework, a tool for developing and executing exploit code against a remote target machine. Other important sub-projects include the Opcode Database, shellcode archive and related research.

The Metasploit Project is well known for its anti-forensic and evasion tools, some of which are built into the Metasploit Framework.

How to pentest Remote PC (Windows 2003 server) with Metasploits - blackMORE Ops

Some users get this error “The following options failed to validate: RHOSTS”

NOTE: This is not an error in Metasploit or in Kali Linux, it’s rather a syntax error on users end. Quite trivial, but an error nevertheless.

When setting RHOSTS you might encounter this error.

msf auxiliary(syn) > set RHOST 10.10.0.7

RHOST => 10.10.0.7

msf auxiliary(syn) > run

[-] Auxiliary failed: Msf::OptionValidateError The following options failed to validate: RHOSTS.

It’s because you’re using RHOST instead of RHOSTS. Even if you have single IP instead of multiple, you’ll have to use RHOSTS and it will work fine.

msf (syn) > set RHOSTS 10.10.0.7
msf (syn) > run

This should fix this little error. Hope that helps someone. Thanks for reading, please share.

Check Also

zANTI - Android Penetration Testing Toolkit & Risk Assessment

Free Android Penetration Testing Toolkit & Risk Assessment

Free Android Penetration Testing Toolkit & Risk Assessment

Inceptor - Template-Driven AV/EDR Evasion Framework

Inceptor – Template-Driven AV/EDR Evasion Framework

Modern Penetration testing and Red Teaming often requires to bypass common AV/EDR appliances in order to execute code on a target. With time, defenses are becoming more complex and inherently more difficult to bypass consistently. Inceptor is a tool which can help to automate great part of this process, hopefully requiring no further effort.

14 comments

  1. That really help

  2. Thank you. Extremely grateful!

  3. thank you

  4. Thanks am using RHOST instead of RHOSTS thanks again

  5. Same error.
    Not helpfull.

  6. worked fine…thanks for helping…:)

  7. Thank you. Super grateful! :)

  8. hghf ytutyu

  9. Thanks a lot!

  10. using armitage msf scan and still receiving auxiliary failed: msf: :option validateError the following options failed to validate rhosts

  11. Hi,
    I am using the auxiliary(ssh_login_pubkey) > run with the following result
    Auxiliary failed: Msf::OptionValidatorError The following options failed to validate: KEY_PATH.

  12. he cant fix that.. he isnt capable

  13. Error: The following options failed to validate: LPORT. plz help me

Leave your solution or comment to help others.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from blackMORE Ops

Subscribe now to keep reading and get access to the full archive.

Continue reading

Privacy Policy on Cookies Usage

Some services used in this site uses cookies to tailor user experience or to show ads.