mirror of
https://github.com/upa/mscp.git
synced 2026-02-04 03:24:58 +08:00
add two env vars to pass password/keyphrase (#9)
MSCP_SSH_AUTH_PASSWORD passes a password, and MSCP_SSH_AUTH_PASSPHRASE passes a passphrase for publickey auth. They enable avoiding interactive password input. Test cases are also added.
This commit is contained in:
@@ -72,6 +72,17 @@ struct mscp_ssh_opts {
|
||||
bool enable_nagle; /** enable Nagle's algorithm if true */
|
||||
};
|
||||
|
||||
/** @def
|
||||
* Environment variable that passes password for ssh password auth
|
||||
*/
|
||||
#define ENV_SSH_AUTH_PASSWORD "MSCP_SSH_AUTH_PASSWORD"
|
||||
|
||||
/** @def
|
||||
* Environment vraible that passes passphrase for private key
|
||||
*/
|
||||
#define ENV_SSH_AUTH_PASSPHRASE "MSCP_SSH_AUTH_PASSPHRASE"
|
||||
|
||||
|
||||
/**
|
||||
* @struct mscp_stats
|
||||
* @brief Structure to get mscp statistics
|
||||
|
||||
Reference in New Issue
Block a user