I'm registering many keys in ssh-agent, and I want to connect sftp server with a private keys with passphrase.
If I don't specify any key information (path or passphrase, etc.), rclone tries all the keys in ssh-agent and fail with
Too many authentication failures (this is intended and OK).
Then, according to rclone's wizard, the solutions for this is using key_file with key_use_agent. That is, I specify the path for the key (with passphrase) and force the use of ssh-agent, and rclone would choose the right key from ssh-agent.
However, when I set up things like this, rclone says "failed to parse private key file: ssh: this private key is passphrase protected".
I can connect with normal
ssh command with IdentitiesOnly=yes and -i .ssh/id_ecdsa (without entering passphrase).
Please help me.
rclone version 1.61.1
I tested both in Linux and Windows
rclone mount servername:/ mountpoint/ -vv
[servername] type = sftp host = localhost user = username key_file = ~/.ssh/id_ecdsa key_use_agent = true port = 5995 shell_type = unix md5sum_command = md5 -r sha1sum_command = none #pubkey_file = ~/.ssh/id_ecdsa.pub
2023/02/24 11:19:52 DEBUG : rclone: Version "v1.61.1" starting with parameters ["rclone" "mount" "servername:/" "mountpoint/" "-vv"] 2023/02/24 11:19:52 DEBUG : Creating backend with remote "servername:/" 2023/02/24 11:19:52 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf" 2023/02/24 11:19:52 Failed to create file system for "servername:/": failed to parse private key file: ssh: this private key is passphrase protected