Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
I just had this same issue after adding ssh to a switch.
%SSH: Failed to encode IOS ASN.1 to SECSH format
In the logs it showed me trying to connect without a user name. I have logging on for ssh.
ip ssh logging
Dec 18 13:35:29.397: %SSH-5-...