0

I'm using plink command line interface because u can provide a password.

As soon ad I'm connected, all input is shredded as follows:

"show pwr" becomes "←7s←7h←7o←7w←7 ←7p←7w←7r←7" few backspaces and then "test" becomes "←←8←←8←←8←←8←←8←←8←←8←←8←←8←←8←←8←←8←←8←←8←←8←←8←←8←←8←7t←7e←7s←7t←7"

console output

I have no idea why it does that - if i run it in GIT Bash its working fine. Quick google didn't yield any results. Happening in cmd and powershell. Please help.

Master Azazel
  • 612
  • 1
  • 12
  • 32
  • How are you using Plink? For an interactive use? Or for some automation? – Martin Prikryl Mar 09 '20 at 09:25
  • for automation. its working more or less using it like this `$test = echo "show pwr" | plink admin@192.168.1.5 -pw XXXXXX -no-antispoof` but id like to know why it behaved like this and how to get rid of it. – Master Azazel Mar 09 '20 at 09:34
  • See [Windows batch scripting: SSH with Plink showing strange sequences in output](https://stackoverflow.com/q/33904171/850848). – Martin Prikryl Mar 09 '20 at 09:37
  • that doesnt get me anywhere. the strange behavior in my case is scrambling the input, not output – Master Azazel Mar 09 '20 at 10:39
  • No. Everything you get on the console is **output**. It does not matter that the contents of the *output* is based on your *input*. You can clearly see, that no matter that your command is echoed with ANSI sequences intermingled, the server clearly understood your command. – Martin Prikryl Mar 09 '20 at 12:14
  • yeah, the server understands the command. i dont have any trouble sending commands and reading responses. i would like to know why the input is scrambled like in the printscreen. but anyway ill try the suggestions in the link – Master Azazel Mar 10 '20 at 14:33
  • *"i would like to know why the input is scrambled like in the printscreen"* – That is explained in the link I have posted. – Martin Prikryl Mar 10 '20 at 16:21
  • Does this answer your question? [Windows batch scripting: SSH with Plink showing strange sequences in output](https://stackoverflow.com/questions/33904171/windows-batch-scripting-ssh-with-plink-showing-strange-sequences-in-output) – Martin Prikryl Mar 16 '20 at 07:03
  • thx, ill try it when i find the time. but you posted the same link twice. – Master Azazel Mar 26 '20 at 08:48

0 Answers0