Hi!
I tried to modify my the https://pkg.go.dev/golang.org/x/crypto/ssh#example-Dial . I want to storno my question, because i forgot some other ssh settings. Best regards, Daniel On 10/4/20 7:24 AM, Kurtis Rader wrote: > What does your question have to do with the Go language? Did you try > any solutions? What did you try? > > On Sat, Oct 3, 2020 at 10:19 PM 'Dániel Görbe' via golang-nuts > <golang-nuts@googlegroups.com <mailto:golang-nuts@googlegroups.com>> > wrote: > > Hi! > > > I want to write a basic function to check whether root login is > enabled or not. > > > On the terminal (OpenSSH 8.3p1-1) it looks like this: > > > If disabled: > > ``` > > $ ssh -o PreferredAuthentications=password -o > PubkeyAuthentication=no r...@disabled.com <mailto:r...@disabled.com> > > r...@disabled.com <mailto:r...@disabled.com>: Permission denied > (publickey). > ``` > > If enabled: > > ``` > > $ ssh -o PreferredAuthentications=password -o > PubkeyAuthentication=no r...@enabled.com <mailto:r...@enabled.com> > > r...@enabled.com <mailto:r...@enabled.com>'s password: > > ``` > > > I thought i can get a similar message with > /golang.org/x/crypto/ssh <http://golang.org/x/crypto/ssh>/ using > /Dial()/'s example code and /Auth/ set to /Password/ only, but the > only message i get is > > /"unable to authenticate, attempted methods [none], no supported > methods remain/" with both enabled and disabled root. > > > How can i get a similar message as OpenSSH's? > > > Thanks, > > Daniel > > > -- > You received this message because you are subscribed to the Google > Groups "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, > send an email to golang-nuts+unsubscr...@googlegroups.com > <mailto:golang-nuts+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > > https://groups.google.com/d/msgid/golang-nuts/206ad267-5f87-a553-c54b-731307aefd6a%40danielgorbe.com > > <https://groups.google.com/d/msgid/golang-nuts/206ad267-5f87-a553-c54b-731307aefd6a%40danielgorbe.com?utm_medium=email&utm_source=footer>. > > > > -- > Kurtis Rader > Caretaker of the exceptional canines Junior and Hank > -- > You received this message because you are subscribed to the Google > Groups "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to golang-nuts+unsubscr...@googlegroups.com > <mailto:golang-nuts+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD8cL1aHt2ymx4f6ANh2q%3DE0WeKW8qSOHMb5H4HhYRNXJQ%40mail.gmail.com > <https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD8cL1aHt2ymx4f6ANh2q%3DE0WeKW8qSOHMb5H4HhYRNXJQ%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- Dániel Görbe GNU/Linux System Administrator - IT Security Consultant PGP: 0x5AEB729B3E642A16 Web: https://danielgorbe.com -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/cf66db1d-26b3-ee64-29fa-e5818694b8cd%40danielgorbe.com.
signature.asc
Description: OpenPGP digital signature