user1889297
user1889297

Reputation: 504

Send commands to Linux terminal with PuTTY

How can I send a command (not to open a file) with PuTTY that will run on a Linux terminal?

For example:

putty.exe 10.31.2.121 -l root -pw password | echo "Hi"

So that I will see the "Hi" on the Linux console?

Upvotes: 1

Views: 4407

Answers (1)

Jase Whatson
Jase Whatson

Reputation: 4207

Use plink.exe (from the developer of PuTTY).

And do something like the following

C:\putty\plink.exe [email protected] -pw P@55W0rD!

-m command.txt

I took this from Automate Cisco SSH connections with plink on Windows.

Upvotes: 3

Related Questions