See Martin's answer it's quicker than this answer.
(Martin's answer is quicker than this answer)
The easiest way to do this is to make sure first thatensure you can connect in Putty 'cos Putty isPuTTY first since it's very similar to WinSCP.
(WinSCP even mentions PuttyGen!!!)
Putty seems to require thatPuTTY requires the key to be a PPK file. A Putty Private Key.
Instructions here mention how to use PuttyGen to convert an RSA key (like OpenSSH uses), to PPK format. https://www.dmit.io/index.php?rp=/knowledgebase/10/How-to-convert-RSA-Private-Key-to-Putty-Private-Key-.ppk.html
You open PuttyGen, do file..load private key. Then it shows PPK files, change that to show all files. Then choose id_rsa.ppk
and then it loads that RSA key. Then do file..save private key. And that should save a PPK file.
Then in Putty under SSH..Auth..Private key file for authentication. You can choose that private key PPK file.
Then Putty asks you to specify the username, same username as you'd use with openssh, the ssh used in cygwin when you do ssh user@ip.[Putty Private Key]
Now you could put putty aside.. but it helps to know how to connect with Putty!
- How to convert an RSA key (like OpenSSH uses) to a
.ppk
with PuTTYgen:- File → Load private key → Change to show all files
- Choose
id_rsa
to load the RSA key → File → Save private key
- In PuTTY:
- Connection → SSH → Auth → Private key file for authentication → Choose the
.ppk
- PuTTY asks you to specify the username, which is the same username as with OpenSSH [SSH used in cygwin when executing
ssh user@ip
] - Now put PuTTY aside, as it helps to know how to connect with PuTTY
- Connection → SSH → Auth → Private key file for authentication → Choose the
WinSCP is very similar. At the login screen click advanced. Then it looks a bit like putty'sWinSCP login screen, click SSH..Authentication..Load private key. Choose that PPK private key, same one that worked in Putty. It will work for WinSCP too.
So, in WinSCP you go to "new session"
Then change file protocol to SCP of course. 'cos that's the protocol intended with the question. SCP is file transfer over SSH.
Then click 'advanced' (it may take a few moments when clicking advanced), that brings up the "advanced site settings" screen. ( it shouldn't call it "site", but anyway..it's really just a computer you are connecting to, that may or may not host a website). It may take a while for the screen to come up.. maybe the program was not written in C++. So lacks some speed. The about section mentions Delphi so maybe that is some explanation for why the screen comes up a bit slowly.
It's this screen here but don't click tools! You can simply point to the Private key file. But it's a putty private key that it wants!
So you use puttygen to convert your RSA private key to a putty private key! You do that in the way I described earlier in my answer.