Before you can setup WinSCP
with a key pair, you need to perform the necessary actions for putty
key based access (see here).
So you should already have a private key somewhere on your directory structure. This provate key will now be added tou your WinSCP setup. Open the WinSCP
programs, select the saved profile to which you want to add the private key:
Then click Advanced to open the configuration window:
Select Authenticate onder SSH and then you see halfway down the right part of the window a textbox named Private Key File:. Click the Browse button and select your private key file:
Once selected, click OK to save this setting and when back on the main window, click Save to save this new setting in the profile.
Now you are ready to transfer files password/2fa code free.