I am using ssh to automatically connect and operate a remote device.  I'd like to distinguish authentication failures from other kinds of failures.  Currently I will get this as an auth failure from ssh:connect():
<div><br></div><div> {error,"Unable to connect using the available authentication methods"}</div><div><br></div><div>Now I could include that error string in a pattern to detect an auth failure, but it feels rather brittle (ie, what if someone changes the wording).  Is there a better way to do it?  Is this an API design bug?</div>
<div><br></div><div>Regards,</div><div>Dan.</div>