mirror of
https://github.com/restic/restic.git
synced 2025-08-12 18:57:39 +00:00
backend/sftp: Add sftp.args option
Allow setting custom arguments for the `sftp` backend, by using the `sftp.args` option. This is similar to the approach already implemented in the `rclone` backend, to support new arguments without requiring future code changes for each different SSH argument. Closes #4241
This commit is contained in:

committed by
Michael Eischer

parent
17f2301cc2
commit
41f70f1f4f
@@ -30,6 +30,11 @@ var sshcmdTests = []struct {
|
||||
"ssh",
|
||||
[]string{"host", "-p", "10022", "-l", "user", "-s", "sftp"},
|
||||
},
|
||||
{
|
||||
Config{User: "user", Host: "host", Port: "10022", Path: "/dir/subdir", Args: "-i /path/to/id_rsa"},
|
||||
"ssh",
|
||||
[]string{"host", "-p", "10022", "-l", "user", "-i", "/path/to/id_rsa", "-s", "sftp"},
|
||||
},
|
||||
{
|
||||
// IPv6 address.
|
||||
Config{User: "user", Host: "::1", Path: "dir"},
|
||||
|
Reference in New Issue
Block a user