exp/ssh: allow for msgUserAuthBanner during authentication
exp/ssh: allow for msgUserAuthBanner during authentication

The SSH spec allows for the server to send a banner message to the client at any point during the authentication process. Currently the ssh client auth types all assume that the first response from the server after issuing a userAuthRequestMsg will be one of a couple of possible authentication success/failure messages. This means that client authentication breaks if the ssh server being connected to has a banner message configured.

This changeset refactors the noneAuth, passwordAuth and publickeyAuth types' auth() function and allows for msgUserAuthBanner during authentication.

R=golang-dev, rsc, dave, agl
CC=golang-dev
http://codereview.appspot.com/5432065

Committer: Adam Langley <db68fba232b2c49ed3e9d3081df349dde7b61dfd@golang.org>

h8liu/golang,h8liu/golang,h8liu/golang,h8liu/golang,h8liu/golang,h8liu/golang,h8liu/golang