in reply to Re^9: Send password in Net::SSH::Expect
in thread Send password in Net::SSH::Expect

Have a look at item 3(b) on the Basic debugging checklist for displaying non-printing characters in your data diagnostics.

  • Comment on Re^10: Send password in Net::SSH::Expect

Replies are listed 'Best First'.
Re^11: Send password in Net::SSH::Expect
by gafaman (Novice) on Jan 23, 2020 at 11:08 UTC
    Thanks, I found something:
    :HOSTA\x{0d}:
    Rest seems find. Working on removing this appendix.
      Bingo! That was it. Thanks, oh venerable monks! Removed it by adding:
      $hostname =~ s/\r//g;
      Now output shows:
      Launching [[ssh -q user@host 'sed -i "s#.*HOSTA#ssh-rsa AAAAB3NzaC1yc +root@HOSTA#gI" /tmp/test.txt']] at ./key.pl line 81.
      And the command is doing what it should. To learn is to struggle.