AuthenticationFailed when password last char is space

When the last character of the root password is ' '(blank), I can't login server.
```
$ knife solo cook example.com
Enter the password for root@example.com:
ERROR: Net::SSH::AuthenticationFailed: root
```