[erlang-questions] detecting ssh auth failures

Daniel Goertzen <>
Tue May 10 21:57:45 CEST 2011

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():

 {error,"Unable to connect using the available authentication methods"}

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?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110510/e3335852/attachment.html>

More information about the erlang-questions mailing list