Sometimes it’s necessary to do things the wrong way.
Plinkmiscuous is the world’s tiniest, laziest modification to the very excellent Plink, part of the PuTTY suite of software.
Plink is a command line only connection tool – it has much of the core functionality of PuTTY without all the fruit of a window and GUI. It’s often necessary to connect through to *nix servers from Windows programmatically, and Plink is generally the tool for the job.
Unless you have a scenario where you can’t know the SSH fingerprint of the server to which you are connecting, or can’t store it (PuTTY puts things in the registry – I’m assuming a hangover from the bad old days of XP) for the account you need to run as.
In these circumstances, the otherwise fully automated Plink demands user interaction to confirm the fingerprint as OK.
Obviously, this is by design – the whole point of SSH is that you can be sure the server you’re connecting to is indeed the one you want before you start sending over authentication details.
But sometimes, security be damned, you need to do something dirty. Please don’t ever do it in a serious or production system.
To that end – the traditional way to “break” Plink and make it work regardless of a stored fingerprint is to pipe or otherwise send a “keypress” for confirmation.
That method sucks.
Plink is open source, so that means we can modify it when it fails to do what we want.
So that’s what I’ve done – it was a change of exactly 1 byte (and some Visual Studio fru fru).
You can find Plinkmiscuous on the software page. It’s based on the current version of Plink at the time of writing. I can update it in the future, but make no promises (and the code change is so simple, you should do it yourself).
And it’s probably worth rethinking whatever it is you’re planning to do with Plinkmiscuous so you don’t have to use it. :-P