ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Access denied - SSH login

    IT Discussion
    7
    27
    3.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      AdamF
      last edited by

      Nothing is blacklisted. In fact, in both Fail2Ban as well as the Responsive firewall in firewall, the IP I'm trying to connect from is whitelisted/in the trusted zone.

      For good measure, I stopped Fail2Ban, and still receive the same messages.

      1 Reply Last reply Reply Quote 0
      • R
        RamblingBiped
        last edited by

        <sarcasm>
        Are you certain CAPS-LOCK isn't on?
        </sarcasm>

        1 Reply Last reply Reply Quote 2
        • R
          RamblingBiped
          last edited by

          Are you monitoring the /var/log/secure file as you are trying to connect? Have you tried connecting to the freepbx IP instead of hostname?

          1 Reply Last reply Reply Quote 1
          • A
            AdamF
            last edited by

            Just tried, and it says Failed password for invalid user root from IP port xxxxx ssh2

            1 Reply Last reply Reply Quote 0
            • R
              RamblingBiped
              last edited by

              "invalid user root"

              What does your sshd_config file look like? Is root allowed? Have you restarted the ssh server since you made the last changes to the config file?

              A 1 Reply Last reply Reply Quote 1
              • A
                AdamF @RamblingBiped
                last edited by

                @RamblingBiped said in Access denied - SSH login:

                "invalid user root"

                What does your sshd_config file look like? Is root allowed? Have you restarted the ssh server since you made the last changes to the config file?

                Yes, service is restarted. The only changes to the stock sshd_config flle is:

                PermitRootLogin yes
                AllowGroups wheel
                Port xxxx
                AddressFamily inet

                1 Reply Last reply Reply Quote 0
                • A
                  Alex Sage
                  last edited by

                  Firewall?

                  1 Reply Last reply Reply Quote 0
                  • S
                    scottalanmiller
                    last edited by

                    Test the login from the box itself using the loopback 127.0.0.1

                    A 1 Reply Last reply Reply Quote 2
                    • A
                      AdamF @scottalanmiller
                      last edited by

                      @scottalanmiller said in Access denied - SSH login:

                      Test the login from the box itself using the loopback 127.0.0.1

                      No go. Permission denied, using the same password that I just logged in with.

                      S 1 Reply Last reply Reply Quote 0
                      • S
                        scottalanmiller @AdamF
                        last edited by

                        @fuznutz04 said in Access denied - SSH login:

                        @scottalanmiller said in Access denied - SSH login:

                        Test the login from the box itself using the loopback 127.0.0.1

                        No go. Permission denied, using the same password that I just logged in with.

                        Okay, so you can rule out networking, both firewalls, etc. It's all down to SSH configuration at this point.

                        A 1 Reply Last reply Reply Quote 2
                        • A
                          AdamF @scottalanmiller
                          last edited by

                          @scottalanmiller said in Access denied - SSH login:

                          @fuznutz04 said in Access denied - SSH login:

                          @scottalanmiller said in Access denied - SSH login:

                          Test the login from the box itself using the loopback 127.0.0.1

                          No go. Permission denied, using the same password that I just logged in with.

                          Okay, so you can rule out networking, both firewalls, etc. It's all down to SSH configuration at this point.

                          Thanks for the tip. That definitely narrowed it down. So after playing with the config file for a while, I concluded that the problem is the line:

                          AllowGroups wheel
                          

                          If I comment that out, it works perfect. if it's uncommented, it doesn't allow access, even to root.

                          (looks up and to the right while squinting eyes, confused...)

                          T 1 Reply Last reply Reply Quote 0
                          • S
                            scottalanmiller
                            last edited by

                            Yeah, that is a bit odd.

                            1 Reply Last reply Reply Quote 0
                            • T
                              travisdh1 @AdamF
                              last edited by

                              @fuznutz04 If you comment out 'PermitRootLogin yes' and leave 'AllowGroups wheel' in, are you able to login as a member of the wheel group? Thinking it might not like overlapping root and wheel, maybe.

                              I'm with @scottalanmiller, it doesn't make sense either way.

                              A 1 Reply Last reply Reply Quote 0
                              • S
                                stacksofplates
                                last edited by

                                I think allow group will only allow members from that group and since root isn't part of wheel it can't log in.

                                1 Reply Last reply Reply Quote 0
                                • S
                                  stacksofplates
                                  last edited by

                                  If you add

                                  AllowUsers root 
                                  

                                  it should also let root along with the wheel group.

                                  1 Reply Last reply Reply Quote 1
                                  • A
                                    AdamF @travisdh1
                                    last edited by

                                    @travisdh1 Didn't like that either. It also doesn't work if I remove AllowGroups and try it with AllowUsers. It's almost like any line I add into that config borks the entire thing.

                                    1 Reply Last reply Reply Quote 1
                                    • S
                                      scottalanmiller
                                      last edited by

                                      Very odd, indeed. Sorry I don't have any magic insight there.

                                      A 1 Reply Last reply Reply Quote 0
                                      • A
                                        AdamF @scottalanmiller
                                        last edited by

                                        @scottalanmiller Yeah, it was a test box on Vultr, and in the end, I'll probably just reinstall it, but the fact that it's doing this is bothering me, especially thinking about if it would be a production box. Oh well, thanks for the help.

                                        1 Reply Last reply Reply Quote 0
                                        • 1
                                        • 2
                                        • 1 / 2
                                        • First post
                                          Last post