0

I know that you can open a PuTTY session and execute a command using a file containing the command, but I was wondering, is there a way to just run the command without the inserting it in a file?

Thanks,

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Yaichael
  • 13
  • 2
  • Not sure but this post might help http://stackoverflow.com/questions/16439039/batch-file-for-putty-psftp-file-transfer-automation – docwobster Dec 22 '16 at 18:05

1 Answers1

1

Not with PuTTY. But for automation, you should not use PuTTY anyway. That's a GUI application for an interactive use.

For automation, use Plink (PuTTY command-line connection tool). The Plink supports the same set of command-line arguments as PuTTY, but can also accept a command on its command line:

plink -ssh user@example.com command
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992