Then set up a WinSCP SSH session in which Allow agent forwarding is enabled. To enable agent forwarding, first start Pageant. Pageant’s protocol is compatible with the OpenSSH server, but the ssh.com server uses a different agent protocol, which WinSCP does not yet support. Note that at present, whether agent forwarding in SSH is available depends on your server. If you want Pageant to stay running but forget all the keys it has acquired, select Remove All Keys from the System tray menu.Īgent forwarding is a mechanism that allows applications on your SSH server machine to talk to the agent on your client machine. Closing the Pageant main window does not shut down Pageant. When you want to shut down Pageant, click the right button on the Pageant icon in the System tray, and select Exit from the menu.
WinSCP can be configured not to try to use Pageant, but it will try by default.
You can now open as many WinSCP sessions as you like without having to type your passphrase again. WinSCP will notice that Pageant is running, retrieve the key automatically from Pageant, and use it to authenticate. Now start WinSCP and open an SSH session to a site that accepts your key. When the key has been loaded, it will appear in the list in the Pageant window. If the key is protected by a passphrase, Pageant will ask you to type the passphrase. Find your private key file in this dialog, and press Open.
Pageant will bring up a file dialog, labelled Select Private Key File. To add a key to Pageant, press the Add Key button. After you add one or more keys, they will show up in the list box. When you start Pageant, it has no keys, so the list box will be empty. This shows the private keys Pageant is holding.