in reply to passwords with special characters are trying to kill me... no seriously!

Even ssh will open a shell on the remote end. The best solution I think is to open the password receiving command reading from a pipe, instead of passing the password with echo or whatever unix command.

# Untested example. Modify to your needs open my $pipe_command, "|-", "ssh $hostname 'passwd --stdin bob'"; print $pipe_command "$password\n"; close $pipe_command;

Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^2: passwords with special characters are trying to kill me... no seriously!
by calmthestorm (Acolyte) on Feb 04, 2011 at 17:36 UTC
    You sir/madam are a friggen genius!!! I don't know why I didn't think of such a simple approach. BTW, I just tested it and it worked beautifully. Thank you thank you thank you.

    Have a great weekend everyone. I know I will now...