tramp-wrong-passwd-regexp

tramp-wrong-passwd-regexp is a variable defined in `tramp.el'.
Its value is

"^.*\\(Connection \\(?:\\(?:clo\\|refu\\)sed\\)\\|Host key verification failed\\.\\|Login \\(?:[Ii]ncorrect\\)\\|N\\(?:ame or service not known\\|o supported authentication methods left to try!\\)\\|Permission denied\\|\\(?:Sorry, try again\\|Timeout, server not responding\\)\\.\\).*\\|^.*\\(Received signal [0-9]+\\).*"


Documentation:
Regexp matching a `login failed' message.
The regexp should match at end of buffer.

You can customize this variable.