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>

Triskite/willstone-goclone,bryanxu/go-zh,rdp/rogerpack2005-golang,bryanxu/go-zh,scirelli/scirelli-go,Triskite/willstone-goclone,rdp/rogerpack2005-golang,webfd/go-zh,rflanagan/reginaldflanagan-project1,webfd/go-zh,scirelli/scirelli-go,mhennings/marcohennings-go,rflanagan/reginaldflanagan-project1,sanjosh/sanjos100-tipc,glycerine/jeaten-go-arrayof-structof,rdp/rogerpack2005-golang,glycerine/jeaten-go-arrayof-structof,mhennings/marcohennings-go,glycerine/jeaten-go-arrayof-structof,d0f/go-zh,webfd/go-zh,d0f/go-zh,mhennings/marcohennings-go,scirelli/scirelli-go,webfd/go-zh,sanjosh/sanjos100-tipc,bryanxu/go-zh,rdp/rogerpack2005-golang,webfd/go-zh,sanjosh/sanjos100-tipc,d0f/go-zh,rflanagan/reginaldflanagan-project1,d0f/go-zh,glycerine/jeaten-go-arrayof-structof,bryanxu/go-zh,d0f/go-zh,rflanagan/reginaldflanagan-project1,rdp/rogerpack2005-golang,webfd/go-zh,rdp/rogerpack2005-golang,webfd/go-zh,scirelli/scirelli-go,Triskite/willstone-goclone,glycerine/jeaten-go-arrayof-structof,Triskite/willstone-goclone,mhennings/marcohennings-go,sanjosh/sanjos100-tipc,Triskite/willstone-goclone,bryanxu/go-zh,rflanagan/reginaldflanagan-project1,mhennings/marcohennings-go,rdp/rogerpack2005-golang,Triskite/willstone-goclone,d0f/go-zh,Triskite/willstone-goclone,scirelli/scirelli-go,sanjosh/sanjos100-tipc,glycerine/jeaten-go-arrayof-structof,mhennings/marcohennings-go,webfd/go-zh,glycerine/jeaten-go-arrayof-structof,rflanagan/reginaldflanagan-project1,Triskite/willstone-goclone,d0f/go-zh,rflanagan/reginaldflanagan-project1,sanjosh/sanjos100-tipc,mhennings/marcohennings-go,d0f/go-zh,glycerine/jeaten-go-arrayof-structof,sanjosh/sanjos100-tipc,bryanxu/go-zh,bryanxu/go-zh,scirelli/scirelli-go,sanjosh/sanjos100-tipc,rdp/rogerpack2005-golang,scirelli/scirelli-go,bryanxu/go-zh,scirelli/scirelli-go,mhennings/marcohennings-go,rflanagan/reginaldflanagan-project1