mirror of
https://github.com/rclone/rclone.git
synced 2025-01-11 00:40:03 +01:00
ssh: opt-in support for diffie-hellman-group-exchange-sha256 diffie-hellman-group-exchange-sha1 - fixes #1810
This commit is contained in:
parent
5433021e8b
commit
0a1169e659
@ -86,7 +86,7 @@ when the ssh-agent contains many keys.`,
|
|||||||
Default: false,
|
Default: false,
|
||||||
}, {
|
}, {
|
||||||
Name: "use_insecure_cipher",
|
Name: "use_insecure_cipher",
|
||||||
Help: "Enable the use of the aes128-cbc cipher. This cipher is insecure and may allow plaintext data to be recovered by an attacker.",
|
Help: "Enable the use of the aes128-cbc cipher and diffie-hellman-group-exchange-sha256, diffie-hellman-group-exchange-sha1 key exchange. Those algorithms are insecure and may allow plaintext data to be recovered by an attacker.",
|
||||||
Default: false,
|
Default: false,
|
||||||
Examples: []fs.OptionExample{
|
Examples: []fs.OptionExample{
|
||||||
{
|
{
|
||||||
@ -94,7 +94,7 @@ when the ssh-agent contains many keys.`,
|
|||||||
Help: "Use default Cipher list.",
|
Help: "Use default Cipher list.",
|
||||||
}, {
|
}, {
|
||||||
Value: "true",
|
Value: "true",
|
||||||
Help: "Enables the use of the aes128-cbc cipher.",
|
Help: "Enables the use of the aes128-cbc cipher and diffie-hellman-group-exchange-sha256, diffie-hellman-group-exchange-sha1 key exchange.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
@ -345,6 +345,7 @@ func NewFs(name, root string, m configmap.Mapper) (fs.Fs, error) {
|
|||||||
if opt.UseInsecureCipher {
|
if opt.UseInsecureCipher {
|
||||||
sshConfig.Config.SetDefaults()
|
sshConfig.Config.SetDefaults()
|
||||||
sshConfig.Config.Ciphers = append(sshConfig.Config.Ciphers, "aes128-cbc")
|
sshConfig.Config.Ciphers = append(sshConfig.Config.Ciphers, "aes128-cbc")
|
||||||
|
sshConfig.Config.KeyExchanges = append(sshConfig.Config.KeyExchanges, "diffie-hellman-group-exchange-sha1", "diffie-hellman-group-exchange-sha256")
|
||||||
}
|
}
|
||||||
|
|
||||||
keyFile := env.ShellExpand(opt.KeyFile)
|
keyFile := env.ShellExpand(opt.KeyFile)
|
||||||
|
@ -75,22 +75,22 @@ host> example.com
|
|||||||
SSH username, leave blank for current username, ncw
|
SSH username, leave blank for current username, ncw
|
||||||
user> sftpuser
|
user> sftpuser
|
||||||
SSH port, leave blank to use default (22)
|
SSH port, leave blank to use default (22)
|
||||||
port>
|
port>
|
||||||
SSH password, leave blank to use ssh-agent.
|
SSH password, leave blank to use ssh-agent.
|
||||||
y) Yes type in my own password
|
y) Yes type in my own password
|
||||||
g) Generate random password
|
g) Generate random password
|
||||||
n) No leave this optional password blank
|
n) No leave this optional password blank
|
||||||
y/g/n> n
|
y/g/n> n
|
||||||
Path to unencrypted PEM-encoded private key file, leave blank to use ssh-agent.
|
Path to unencrypted PEM-encoded private key file, leave blank to use ssh-agent.
|
||||||
key_file>
|
key_file>
|
||||||
Remote config
|
Remote config
|
||||||
--------------------
|
--------------------
|
||||||
[remote]
|
[remote]
|
||||||
host = example.com
|
host = example.com
|
||||||
user = sftpuser
|
user = sftpuser
|
||||||
port =
|
port =
|
||||||
pass =
|
pass =
|
||||||
key_file =
|
key_file =
|
||||||
--------------------
|
--------------------
|
||||||
y) Yes this is OK
|
y) Yes this is OK
|
||||||
e) Edit this remote
|
e) Edit this remote
|
||||||
@ -243,7 +243,7 @@ when the ssh-agent contains many keys.
|
|||||||
|
|
||||||
#### --sftp-use-insecure-cipher
|
#### --sftp-use-insecure-cipher
|
||||||
|
|
||||||
Enable the use of the aes128-cbc cipher. This cipher is insecure and may allow plaintext data to be recovered by an attacker.
|
Enable the use of the aes128-cbc cipher and diffie-hellman-group-exchange-sha256, diffie-hellman-group-exchange-sha1 key exchange. Those algorithms are insecure and may allow plaintext data to be recovered by an attacker.
|
||||||
|
|
||||||
- Config: use_insecure_cipher
|
- Config: use_insecure_cipher
|
||||||
- Env Var: RCLONE_SFTP_USE_INSECURE_CIPHER
|
- Env Var: RCLONE_SFTP_USE_INSECURE_CIPHER
|
||||||
@ -253,7 +253,7 @@ Enable the use of the aes128-cbc cipher. This cipher is insecure and may allow p
|
|||||||
- "false"
|
- "false"
|
||||||
- Use default Cipher list.
|
- Use default Cipher list.
|
||||||
- "true"
|
- "true"
|
||||||
- Enables the use of the aes128-cbc cipher.
|
- Enables the use of the aes128-cbc cipher and diffie-hellman-group-exchange-sha256, diffie-hellman-group-exchange-sha1 key exchange.
|
||||||
|
|
||||||
#### --sftp-disable-hashcheck
|
#### --sftp-disable-hashcheck
|
||||||
|
|
||||||
@ -325,7 +325,7 @@ return the total space, free space, and used space on the remote
|
|||||||
for the disk of the specified path on the remote or, if not set,
|
for the disk of the specified path on the remote or, if not set,
|
||||||
the disk of the root on the remote.
|
the disk of the root on the remote.
|
||||||
`about` will fail if it does not have shell
|
`about` will fail if it does not have shell
|
||||||
access or if `df` is not in the remote's PATH.
|
access or if `df` is not in the remote's PATH.
|
||||||
|
|
||||||
Note that some SFTP servers (eg Synology) the paths are different for
|
Note that some SFTP servers (eg Synology) the paths are different for
|
||||||
SSH and SFTP so the hashes can't be calculated properly. For them
|
SSH and SFTP so the hashes can't be calculated properly. For them
|
||||||
|
Loading…
Reference in New Issue
Block a user