Re: [go-nuts] Re: Is there functionality in golang.org/x/crypto/ssh to close a SSH connection server-side after N number of (password) tries?

2017-03-16 Thread Konstantin Khomoutov
On Thu, 16 Mar 2017 03:07:44 -0700 (PDT) ikkini wrote: > For anyone trying this: If you 'break userAuthLoop, you'll end up > below the label, which equals success. Probably not what you want :/ > instead, I'm now using 'break' and authErr, which gives me the > desired behavior. A tangential issu

[go-nuts] Re: Is there functionality in golang.org/x/crypto/ssh to close a SSH connection server-side after N number of (password) tries?

2017-03-16 Thread ikkini
For anyone trying this: If you 'break userAuthLoop, you'll end up below the label, which equals success. Probably not what you want :/ instead, I'm now using 'break' and authErr, which gives me the desired behavior. diff --git a/ssh/server.go b/ssh/server.go index 37df1b3..0f4dd74 100644 --- a/s

[go-nuts] Re: Is there functionality in golang.org/x/crypto/ssh to close a SSH connection server-side after N number of (password) tries?

2017-03-14 Thread ikkini
On Sunday, February 26, 2017 at 6:47:34 AM UTC+1, Tamás Gulácsi wrote: > > Provide a proper PasswordCallback to your server, as in the NewServerConn > example (https://godoc.org/golang.org/x/crypto/ssh#NewServerConn). > > Thats your function, you can program any algorithm you wish. > Thanks for