Coder Social home page Coder Social logo

Comments (7)

rndmh3ro avatar rndmh3ro commented on May 12, 2024

Hi,

normally setting this should be enough. However to help you I'd need to see your whole sshd_config and the output in the log, /var/log/auth.log or /var/log/secure depending on your operating system.

from ansible-ssh-hardening.

Office-Manager avatar Office-Manager commented on May 12, 2024

Hey @rndmh3ro thanks for the reply. Sorry for the delay but needed access to the machine to get the information for you

Here is the sshd_config file sshd_config

Also here's the logs from the server once sshd was restarted. var/log/messages and var/log/secure

In a desperation attempt I also tried changing this in the sshd_config file

# Authentication
# --------------

# Secure Login directives.
UseLogin yes

But even then the login was denied ( I added the /var/log/messages output for that attempt to the previous gist too)

from ansible-ssh-hardening.

rndmh3ro avatar rndmh3ro commented on May 12, 2024

Well it says failed publickey for efthruser. Did you use the correct one? Are the permissions of /home/efthruser/.ssh correct?
Did you try it with another user?

from ansible-ssh-hardening.

Office-Manager avatar Office-Manager commented on May 12, 2024

So the permissions for .ssh and the files within are correct, however I was hoping I'd be able to delete any authorized keys .... I was hoping if the user was listed it would allow them to enter a password and not require a ssh key for access.

from ansible-ssh-hardening.

rndmh3ro avatar rndmh3ro commented on May 12, 2024

The key has to be authorized, otherwise it won't work. These are two layers of security, the authorized key and the sshd_config.
Password auth is disabled in the sshd_config.

from ansible-ssh-hardening.

Office-Manager avatar Office-Manager commented on May 12, 2024

ahh I'm such a numpty ,

PasswordAuthentication no is what i need to change instead of UseLogin yes

from ansible-ssh-hardening.

rndmh3ro avatar rndmh3ro commented on May 12, 2024

Glad you got it working!

from ansible-ssh-hardening.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.