Results 1 to 4 of 4

Thread: SSH MaxAuthTries not working?

  1. #1
    Join Date
    Apr 2009
    Beans
    80
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    SSH MaxAuthTries not working?

    Hi All,
    It seems my MaxAuthTries doesn't work as I expected?

    My understanding is, this attribute limits amount of password keyed (or in my case security key for my public key) when connecting to my SSH server.

    Below is my sshd_config:
    Code:
    Port 1000
    AddressFamily any
    AuthorizedKeysFile %h/.ssh/authorized_keys
    AllowTcpForwarding no
    Banner /etc/ssh/banner
    ChallengeResponseAuthentication no
    ciphers aes256-cbc
    ClientAliveCountMax 2
    ClientAliveInterval 2
    Compression delayed
    GSSAPIAuthentication no
    HostbasedAuthentication no
    HostKey /etc/ssh/ssh_host_rsa_key
    HostKey /etc/ssh/ssh_host_dsa_key
    IgnoreRhosts yes
    IgnoreUserKnownHosts yes
    KeyRegenerationInterval 3600
    LoginGraceTime 15s
    LogLevel VERBOSE
    MaxAuthTries 6
    PasswordAuthentication no
    PermitEmptyPasswords no
    PermitRootLogin no
    PrintMotd yes
    Protocol 2
    PubKeyAuthentication yes
    RhostsRSAAuthentication no
    RSAAuthentication yes
    ServerKeyBits 1024
    StrictModes yes
    SyslogFacility AUTH
    UsePrivilegeSeparation yes
    TCPKeepAlive yes
    X11Forwarding no
    MaxStartups 3:50:10
    The only one that stopping people login to my SSH server is that LoginGraceTime which is 15 seconds, after that period, the person is disconnected; but seems I able to key-in more than 3x of wrong passwords within that 15 seconds window...

    Any help would be great, thanks!!

  2. #2
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: SSH MaxAuthTries not working?

    PasswordAuthentication no
    This option does not work for keys.

    Enable password login and re-try =)

    Of course now that you see how it works, I advise you stay with keys =)
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  3. #3
    Join Date
    Aug 2006
    Beans
    841

    Re: SSH MaxAuthTries not working?

    install and configure fail2ban to monitor your auth log file.

    it will make iptables drop ssh connections from ips trying to bruteforce your box.

  4. #4
    Join Date
    Apr 2009
    Beans
    80
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: SSH MaxAuthTries not working?

    Ah interesting, so in this case if I use normal password (without public-private key) I can limit the amount of password keyed during login.
    But when I use pub-priv key, I can't...

    The only thing that limit both of them is the LoginGraceTime timeout...

    Quote Originally Posted by bodhi.zazen View Post
    Enable password login and re-try =)

    Of course now that you see how it works, I advise you stay with keys =)
    Thanks for this, I will check fail2ban later...
    Quote Originally Posted by eldragon View Post
    install and configure fail2ban to monitor your auth log file.

    it will make iptables drop ssh connections from ips trying to bruteforce your box.

Tags for this Thread

Bookmarks

Posting Permissions

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