Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sftp: fix using key_use_agent and key_file together needing private k…
…ey file When using ssh-agent to hold multiple keys, it is common practice to configure openssh to use a specific key by setting the corresponding public key as the `IdentityFile`. This change makes a similar behavior possible in rclone by having it parse the `key_file` config as the public key when `key_use_agent` is `true`. rclone already attempted this behavior before this change, but it assumed that `key_file` is the private key and that the public key is specified in `${key_file}.pub`. So for parity with the openssh behavior, this change makes rclone first attempt to read the public key from `${key_file}.pub` as before (for the sake of backward compatibility), then fall back to reading it from `key_file`. Fixes rclone#6791
- Loading branch information