• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • How to fix "Postponed keyboard-interactive for invalid user from port ssh2 [preauth]"

    The other day I was unable to perform a passwordless (passphrase) based authentication for one of my user and for every attempt I was getting the below error

    Postponed keyboard-interactive for invalid user deepak from port 59754 ssh2 [preauth]
    There can be actually multiple reasons for this.
    • The user really does not exist
    • Password is locked for this user (assuming you are unable to login using the password of this user)
    • pam tally is used to deny the login for this user
    • Insufficient privilege for the user to login

    To make sure if the user exists type

    # id deepak
    uid=1002(deepak) gid=100(users) groups=100(users)

    This will give you details like userid of this user and the groups he is a member of.
    In case the user doesn't exists you may get output like below
    # id deepak
    id: deepak: no such user

    Validate your sshd config to make sure there are no user or group based restrictions. For my case this was the real culprit
    In my sshd config file /etc/ssh/sshd_config I use an additional parameter
    AllowGroups work wheel home root test_group
    and the user I was trying to use for performing ssh was not part of any of these groups
    There can also be additional parameter like ALlowUsers

    If you have made recent changes to pam_tally config for sshd then try to rollback and identify the problem.

    To check if the password is locked use the below link to get more information
    How to check the lock status of any user account in Linux

    Follow the below links for more tutorials

    How to find the path of any command in Linux
    How to configure a Clustered Samba share using ctdb in Red Hat Cluster
    How to delete an iscsi-target from openfiler and Linux
    How to perform a local ssh port forwarding in Linux
    How to use yum locally without internet connection using cache?
    What is umask and how to change the default value permanently?
    Understanding Partition Scheme MBR vs GPT
    How does a successful or failed login process works in Linux
    How to find all the process accessing a file in Linux
    How to exclude multiple directories from du command in Linux
    How to configure autofs in Linux and what are its advantages?
    How to resize software raid partition in Linux
    How to configure Software RAID 1 mirroring in Linux
    How to prevent a command from getting stored in history in Linux

    Deepak Prasad

    Deepak Prasad is a techie and an author who is still trying to survive in this IT generation with very little knowledge he has on Linux/Unix, VMware, SAN Storage, Automation, networking etc

    You can follow him on Facebook or Google+

    Do you also have something to share here?

    Become an author and be a part of our GoLinuxHub Team, Click here for more information
    How to fix "Postponed keyboard-interactive for invalid user from port ssh2 [preauth]" How to fix "Postponed keyboard-interactive for invalid user <username> from <host> port <port_no> ssh2 [preauth]" Reviewed by Deepak Prasad on Saturday, December 16, 2017 Rating: 5

    No comments:

    Powered by Blogger.