I have a shortcut which in the terget field has:

"C:\Program Files\PuTTY\putty.exe" user@remoteMachineName -pw password

I want to add some commands to send to Linux, so that for example after clicking this shortcut Im logged in automatically (as it is now) and for example 'htop' is launched. How do I do that?

  • @VlastimilBurián As far as I understand this still dont allow to use non-interactive commands.
    – Aleksander
    Sep 16 at 10:50
  • As I do not use Windows for a decade, I do not really remember already what I used back then... and that information would have been deprecated by now anyway. Sorry. Sep 16 at 14:24

1 Answer 1


plink.exe, which is shipped with PuTTY is better suited for this. You can either use it for every single command you want to run, or you put the commands as a script on the server and run the script with plink.

  • Good answer, didn't know about plink. Sep 16 at 8:39
  • "C:\Program Files\PuTTY\plink.exe" user@remoteMachineName -pw password htop is not working for me
    – Aleksander
    Sep 16 at 9:36
  • Same for "C:\Program Files\PuTTY\plink.exe" user@remoteMachineName -pw password --no-antispoof -t "htop", the window closes immediately.
    – Aleksander
    Sep 16 at 9:46
  • Well, that's the point of plink. It's for non-interactive commands. Sep 16 at 9:51
  • Is there any way to launch non-interactive commands?
    – Aleksander
    Sep 16 at 11:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .