문제

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.

도움이 되었습니까?

해결책

Try with the following command,

echo myString | plink test2 -l admin
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top