How can I avoid manually specifying my private key file when using PuTTY's pscp command?

317 views Asked by At

I have installed PuTTY and configured public/private key pairs that work nicely from inside PuTTY.

When I use pscp, I find that I have to use the -i *keyfile* option to specify the private key (I have the keys in the C:\users\username\.ssh directory)

I notice that the online examples of pscp that I see don't use the -i option.

Is there a specific directory I need to place the key files in, or is there something similar in concept to the "config" file used in the private key directory on Linux?

I was expecting not to have to manually specify the private key file when using pscp.

1

There are 1 answers

0
Martin Prikryl On

PuTTY tools do not look for keys in any fixed location.

All you can do is to save the path to your private key to "Default Settings" in PuTTY GUI. I wouldn't recommend that.

Better is to load your keys to Pageant. The pscp picks them up automatically from there.