Find the answer to your Linux question:
Results 1 to 2 of 2
Hi! I wonder if there is a way that a user immediately gets disconnected whenever he enters a wrong username. (So that he isn`t asked for a password). Especially I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2012
    Posts
    5

    Question Logoff on wrong user name


    Hi!

    I wonder if there is a way that a user immediately gets disconnected whenever he enters a wrong username. (So that he isn`t asked for a password).

    Especially I want this behavior when connecting with ssh.

    Is there maybe a pam mod for this?

    Greetings,

    trudy1

  2. #2
    Just Joined!
    Join Date
    Aug 2009
    Posts
    83
    Quote Originally Posted by trudy1 View Post
    I wonder if there is a way that a user immediately gets disconnected whenever he enters a wrong username. (So that he isn`t asked for a password). Especially I want this behavior when connecting with ssh.
    With pam_listfile you can create a list of allowed accounts. But doing that will benefit only brute-forcers because they get immediate response if the account doesn't exist. I suggest you use fail2ban or equivalent instead.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •