sftp: clarify the docs for key_pem - fixes #7921
This commit is contained in:
parent
e111ffba9e
commit
13fa583368
1 changed files with 12 additions and 2 deletions
|
@ -75,8 +75,18 @@ func init() {
|
||||||
Help: "SSH password, leave blank to use ssh-agent.",
|
Help: "SSH password, leave blank to use ssh-agent.",
|
||||||
IsPassword: true,
|
IsPassword: true,
|
||||||
}, {
|
}, {
|
||||||
Name: "key_pem",
|
Name: "key_pem",
|
||||||
Help: "Raw PEM-encoded private key.\n\nIf specified, will override key_file parameter.",
|
Help: `Raw PEM-encoded private key.
|
||||||
|
|
||||||
|
Note that this should be on a single line with line endings replaced with '\n', eg
|
||||||
|
|
||||||
|
key_pem = -----BEGIN RSA PRIVATE KEY-----\nMaMbaIXtE\n0gAMbMbaSsd\nMbaass\n-----END RSA PRIVATE KEY-----
|
||||||
|
|
||||||
|
This will generate the single line correctly:
|
||||||
|
|
||||||
|
awk '{printf "%s\\n", $0}' < ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
If specified, it will override the key_file parameter.`,
|
||||||
Sensitive: true,
|
Sensitive: true,
|
||||||
}, {
|
}, {
|
||||||
Name: "key_file",
|
Name: "key_file",
|
||||||
|
|
Loading…
Add table
Reference in a new issue