Автор Тема: Слака да отказва достъп ssh  след 3 опит  (Прочетена 1451 пъти)

__eve__

  • Напреднали
  • *****
  • Публикации: 71
    • Профил
    • WWW
Здравейте
 Може ли Слака да дропи нахалника по ssh след трета грешна парола
Активен

sys7em

  • Напреднали
  • *****
  • Публикации: 401
    • Профил
    • WWW
Слака да отказва достъп ssh  след 3 опит
« Отговор #1 -: May 30, 2005, 09:41 »
Цитат
MaxStartups 10:30:60

which (from the man page):

             Specifies the maximum number of concurrent unauthenticated con-
             nections to the sshd daemon.  Additional connections will be
             dropped until authentication succeeds or the LoginGraceTime
             expires for a connection.  The default is 10.

             Alternatively, random early drop can be enabled by specifying the
             three colon separated values ``start:rate:full'' (e.g.,
             "10:30:60").  sshd will refuse connection attempts with a proba-
             bility of ``rate/100'' (30%) if there are currently ``start''
             (10) unauthenticated connections.  The probability increases lin-
             early and all connection attempts are refused if the number of
             unauthenticated connections reaches ``full'' (60).
Активен

Европейци сме ний, ама все не сме дотам!. . . Прощавай, не е за чудо пак да се срещнем.

rpetrov

  • Напреднали
  • *****
  • Публикации: 571
    • Профил
    • WWW
Слака да отказва достъп ssh  след 3 опит
« Отговор #2 -: May 30, 2005, 12:05 »
Цитат (,Май 30 2005 @ 00:50)
Здравейте
 Може ли Слака да дропи нахалника по ssh след трета грешна парола

Слака, както и не слаковете, не могат и не им е работа да го правят '<img'> .

А ако питаш за sshd от OpenSSH, това е друга тема.
Подобно нещо, може би най-скоро дискутирано, е тук: Feature request: FAIL_DELAY-support for sshd .
Препоръчва се използване на възможностите на "защитната стена" за блокиране на достъпа.
Активен

rpetrov

  • Напреднали
  • *****
  • Публикации: 571
    • Профил
    • WWW
Слака да отказва достъп ssh  след 3 опит
« Отговор #3 -: May 30, 2005, 12:16 »
П.П. възможно е да ти помогне и опцията MaxAuthTries на sshd при версии след 3.9. Преди тази версия става с промяна и прекомпилиране на кода "#define AUTH_FAIL_MAX ...".
По подразбиране стойността е шест.
Активен

__eve__

  • Напреднали
  • *****
  • Публикации: 71
    • Профил
    • WWW
Слака да отказва достъп ssh  след 3 опит
« Отговор #4 -: May 30, 2005, 22:26 »
Ето част от моя sshd_config:
#       $OpenBSD: sshd_config,v 1.68 2003/12/29 16:39:50 millert Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options change a
# default value.

#Port 22
#Protocol 2,1
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
#obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO


# Authentication:

#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile     .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes


#UsePAM no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication (via challenge-response)
# and session processing. Depending on your PAM configuration, this may
# bypass the setting of 'PasswordAuthentication' and 'PermitEmptyPasswords'
#UsePAM no

#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression yes
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10

# no default banner path
#Banner /some/path

  ри мен това ли е MaxStartups 10
Активен

rpetrov

  • Напреднали
  • *****
  • Публикации: 571
    • Профил
    • WWW
Слака да отказва достъп ssh  след 3 опит
« Отговор #5 -: May 31, 2005, 09:19 »
Цитат
#       $OpenBSD: sshd_config,v 1.68 2003/12/29 16:39:50 millert Exp $
Хмм версия 3.8x - не става да се промени MaxAuthTries без прекомпилиране.
И без да променяш нищо след шест неуспешни опита, т.е. при седмия връзката ще бъде прекъсната от сървера със съобщението 'Too many authentication failures'. Заб.: брои се за всички разрешени 'authentication' методи заедно.

Въпроса е много общ и естествено могат да се предложат доста варианти.

П.П.: в конф. файл редовете започващи с '#' са коментари. Изредени са опции със стойностите им по подразбиране - просто е по-четимо.
Активен