Reputation: 51841
I can call Remote Command by local file from console(-m option) in putty.
Is it possible to do the same from Putty GUI(Connection->SSH->Remote command, or elsewhere)?
Upvotes: 0
Views: 883
Reputation: 7803
So, to put it more clearly, the question is can we set a file as the source of the remote command in the gui.
Not directly, no - it explicitly takes only a string. Possibly one of the various putty forks has it added (although I can confirm kitty does not).
The only way I can think of to do it is to wrap putty in a script which reads the content of the file (whatever it is) and puts that value into the windows registry at HKEY_CURRENT_USER/Software/SimonTatham/PuTTY/Sessions/NAMEOFSESSION/RemoteCommand
before executing putty.
Upvotes: 1