OS Manuals

/usr/bin/sshpass

Non-interactive SSH authentication utility

From sshpass 1.10-r7 (os), captured 2026-11-05 by running sshpass -help (exit 0). permalink

Usage: sshpass [-f|-d|-p|-e[env_var]] [-hV] command parameters
   -f filename   Take password to use from file.
   -d number     Use number as file descriptor for getting password.
   -p password   Provide password as argument (security unwise).
   -e[env_var]   Password is passed as env-var "env_var" if given, "SSHPASS" otherwise.
   With no parameters - password will be taken from stdin.

   -P prompt     Which string should sshpass search for to detect a password prompt.
   -v            Be verbose about what you're doing.
   -h            Show help (this screen).
   -V            Print version information.
At most one of -f, -d, -p or -e should be used.
Options (11)
OptionDescriptionSource
-f filenameTake password to use from file.help
-d numberUse number as file descriptor for getting password.help
-p passwordProvide password as argument (security unwise).help
-e env_varPassword is passed as env-var "env_var" if given, "SSHPASS" otherwise.help
-P promptWhich string should sshpass search for to detect a password prompt.help + man
-vBe verbose about what you're doing.help + man
-hShow help (this screen).help
-VPrint version information.help
-ppasswordThe password is given on the command line. (in the manual page but not in --help)man
-ffilenameThe password is the first line of the file filename. (in the manual page but not in --help)man
-dnumbernumber is a file descriptor inherited by sshpass from the runner. (in the manual page but not in --help)man
Exit status (7) from the manual page
1Invalid command line argument
2Conflicting arguments given
3General runtime error
4Unrecognized response from ssh (parse error)
5Invalid/incorrect password
6Host public key is unknown.
7IP public key changed.

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.