Skip to content

ssh: Additional AuthMethods are ignored #7787

@gopherbot

Description

@gopherbot

by gereon.frey@dynport.de:

What does 'go version' print?
go version devel +1a32fe60e079 Thu Feb 13 03:09:03 2014 -0500 linux/amd64

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.

1. Updated go.crypto/ssh (aka gosshnew)
2. Had a ClientConfig with multiple supported AuthMethods ("password" and
"publickey") like in http://play.golang.org/p/BHActTctt9

What happened?
ssh: unable to authenticate, attempted methods [none publickey], no supported methods
remain

What should have happened instead?
It should have tried "password", too.

Please provide any additional information below.
Problem is related to the nested for loops in connection.clientAuthenticate used to
determine the common client requested and server supported methods. The break statement
just stops the inner loop, so that only the last common method is used.

Attached patch fixes issue.

Attachments:

  1. crypto.patch (603 bytes)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions