on Mac OSX, from inside terminal, how to input password that contains a special character?

0

I was making a script to change the password of login to one of my VPS machine, and it's something like the following, and unfortunatelly the ^M character (not the combination of '^' and 'M') was added mistakenly into the script. And now I couldn't login to the machine anymore. I found out the character when editing the script using vi. Now I am wondering what should I input when being asked for the password. Any help would be really appreciated!

ssh root@xxx.xxx.xxx.xxx "passwd <<EOF
testpass^M
testpass^M
EOF";

bcbishop

Posted 2012-12-09T03:42:22.943

Reputation: 101

Command+V comes up as ^M for me. – None – 2012-12-09T03:44:56.573

^M is the control character for newline. What should work is hitting ctrl-v then return (then return again to actually send the password). – Brian Roach – 2012-12-09T03:46:52.950

On my machine, Command+V is paste. Tried with ctrl-v, not work neither. :( – None – 2012-12-09T07:38:13.573

No answers