Configure Public Key Authentication for SFTP using Pageant#
Public-key authentication using Pageant SSH Agent allows you to connect to a remote server without a password. Instead of passwords, you use a pair of keys (private and public) for authentication. The private key is kept secret, while the public key is shared with the server.
Important
The previous built-in Pageant integration has been removed in Cyberduck 9.6. Refer to #18479.
Refer to How To Use Pageant to Streamline SSH Key Authentication with PuTTY for general usage of Pageant. Pageant supports writing the IdentityAgent-option into an OpenSSH configuration file on startup.
Install PuTTY, which includes Pageant and PuTTYgen.
Start Pageant with the
--openssh-configoption, e.g. in the shortcut used to launch Pageant at login. Private key files to load can be appended to the command line.pageant.exe --openssh-config %USERPROFILE%\.ssh\pageant.confAdd an
Includedirective at the top of%USERPROFILE%\.ssh\configbefore anyHostentry to apply it to all hosts.Include ~/.ssh/pageant.confOpen your private key in PuTTYgen and copy the public key shown in Public key for pasting into OpenSSH authorized_keys file. Add it to the
authorized_keysin your~/.sshdirectory on the server running OpenSSH.Add a new Bookmark in Cyberduck. Enter the alias from your OpenSSH configuration or the hostname in Server. You do not need to set a value for Password.
Tip
The server may respond with Too many authentication failures when trying to authenticate with all keys loaded in Pageant. In the Bookmark panel, select the public key corresponding to your private key loaded in Pageant for SSH Private Key. The public key must be available as a file, e.g. saved from PuTTYgen to
%USERPROFILE%\.ssh\mykey.pub.Alternatively, add the public key to the OpenSSH configuration file
~/.ssh/configwith theIdentityFiledirective# Public Key File used to filter identities from SSH agent IdentityFile ~/.ssh/mykey.pub
Connect to the server. The private key loaded in Pageant is used to authenticate.