When the user tries to connect by NX protocol and key-based authentication, the following error is issued:
Error is 22: Invalid argument
This happens only when the user's name contains capital letters.
Workaround to this problem would be providing username with lower-case letters applies to Mac OSX and Windows platforms.