Toby
Toby

Reputation: 10144

send non-command string in plink

I am trying to use plink to send a data string to an embedded SSH server. If I log in using plink on the command line like so

plink test2 -l admin

and wait for the "Using username "admin" line, then just start typing the data string is transmitted correctly character by character down to the server

However if I try something like

plink test2 -l admin myString

Then plink tries to open a shell on the server with the string as a command, which it wont do and so an error is returned. (Have tried putting the string in a txt file an passing the file instead with no luck)

How can I pass the string as just that, a string, and not a command?

(The reason for this is the port the SSH is connecting to is actually forwarding data straight onto a serial bus that my embedded application should use)

EDIT: or maybe with tunnelier's sexec? or any other suitable windows based ssh cmd prompt client you could recommend.

Upvotes: 0

Views: 1260

Answers (1)

dave4420
dave4420

Reputation: 47052

Try with the following command,

echo myString | plink test2 -l admin

Upvotes: 1

Related Questions