I have a situation where I need to have PuTTY (or another SSH client for Windows) automatically log into another machine via SSH. I realize that this isn't a good idea security-wise, but unfortunately I'm constrained by the limitations both on the client and the server.
The best solution would be to have a shortcut or script on the desktop that, when double clicked, will connect to the server and automatically log in. Can I do this with PuTTY?
I am willing to explore public key authentication, but I'm not sure where the PuTTY key resides or how to copy it to the server, as the app starts automatically upon login.
You should use SSH keys instead. You can have those passwordless too. Its not a good idea either, but it's a lot better than saving passwords in scripts.
You generate a key with putty-gen, and save it where ever you like. Then you create a profile in putty.exe and attach that key to it.
When you want to start with that profile:
You will do:
Notice that using public-key authentication is safer and preferred.
abandon putty if you need to store passwords such as remote ssh access to management consoles where you can't drop keys into the firmware image etc. i can think of 4 scenarios where you can't use keys and putty gets in your way and slows you down.