-1

All,

I have a script that is using plink to connect to ~300 routers. I last used it to update a password for an admin account. Short is, password containing ! is failing.

I can SSH to the router with the password containing ! just can't connect using plink. I have tried replacing ! with %21. Tried escaping with ! and ^!. Nothing is working.

Thoughts?

user547352
  • 49
  • 2
  • pscp works fine with the password containing a ! This is going to turn into a real problem! – user547352 Sep 27 '17 at 15:49
  • 1
    Please [edit] your question to include the relevant parts of your script. – Kenster Sep 27 '17 at 15:59
  • Possible duplicate of [How can I escape an exclamation mark ! in cmd scripts?](https://stackoverflow.com/questions/3288552/how-can-i-escape-an-exclamation-mark-in-cmd-scripts) - Your problem has nothing to do with Plink. Plink has no problem with exclamation mark in password. It's rather you use a delayed expansion in your batch file (to *"connect to ~300 routers"*). – Martin Prikryl Sep 27 '17 at 16:25

1 Answers1

0

Yea, that was a lot of nonsense to end-up with double ^

So. Escape ! with ^^

Example plink -pw abc^^!

user547352
  • 49
  • 2