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:
Ryo Nakamura
2024-02-06 10:35:38 +09:00
parent 9908fb309d
commit ff45d9d71b
11 changed files with 172 additions and 20 deletions

View File

@@ -236,6 +236,24 @@ Prints help.
.SH EXIT STATUS
Exit status is 0 on success, and >0 if an error occurs.
.SH ENVIRONMENT
.PP
.B mscp
recognizes the following environment variables.
.TP
.B MSCP_SSH_AUTH_PASSWORD
This environment variable passes a password for password
authentication to establish SSH connections.
.TP
.B MSCP_SSH_AUTH_PASSPHRASE
This environment variable passes a passphrase for public-key
authentication for establishing SSH connections.
.SH NOTES
.PP

View File

@@ -2,7 +2,7 @@
MSCP
====
:Date: v0.1.3
:Date: v0.1.3-15-g9908fb3
NAME
====
@@ -147,6 +147,19 @@ EXIT STATUS
Exit status is 0 on success, and >0 if an error occurs.
ENVIRONMENT
===========
**mscp** recognizes the following environment variables.
**MSCP_SSH_AUTH_PASSWORD**
This environment variable passes a password for password
authentication to establish SSH connections.
**MSCP_SSH_AUTH_PASSPHRASE**
This environment variable passes a passphrase for public-key
authentication for establishing SSH connections.
NOTES
=====