mirror of
https://github.com/rclone/rclone.git
synced 2025-03-14 08:25:15 +08:00
sftp: allow custom ssh client config
This commit is contained in:
parent
2114fd8f26
commit
4fddec113c
@ -427,6 +427,12 @@ func NewFs(name, root string, m configmap.Mapper) (fs.Fs, error) {
|
|||||||
sshConfig.Auth = append(sshConfig.Auth, ssh.Password(clearpass))
|
sshConfig.Auth = append(sshConfig.Auth, ssh.Password(clearpass))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return NewFsWithConnection(name, root, opt, sshConfig)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewFsWithConnection creates a new Fs object from the name and root and a ssh.ClientConfig. It connects to
|
||||||
|
// the host specified in the ssh.ClientConfig
|
||||||
|
func NewFsWithConnection(name string, root string, opt *Options, sshConfig *ssh.ClientConfig) (fs.Fs, error) {
|
||||||
f := &Fs{
|
f := &Fs{
|
||||||
name: name,
|
name: name,
|
||||||
root: root,
|
root: root,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user