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> 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
>
> r...@disabled.com: Permission denied (publickey).
> ```
>
> If enabled:
>
> ```
>
> $ ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no
> r...@enabled.com
>
> 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.
> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD8cL1aHt2ymx4f6ANh2q%3DE0WeKW8qSOHMb5H4HhYRNXJQ%40mail.gmail.com.

Reply via email to