Portál AbcLinuxu, 12. května 2025 11:05

Dotaz: zakaz prihlaseni

24.1.2007 16:26 asdf
zakaz prihlaseni
Přečteno: 166×
Odpovědět | Admin
jak se da v OpenSSH zakazat prihlaseni vybranych uzivatelu?
Nástroje: Začni sledovat (1) ?Zašle upozornění na váš email při vložení nového komentáře.

Odpovědi

Josef Kufner avatar 24.1.2007 18:01 Josef Kufner | skóre: 70
Rozbalit Rozbalit vše Re: zakaz prihlaseni
Odpovědět | | Sbalit | Link | Blokovat | Admin
RTFM: (kurzívou je to co máš psát ty)
$ man sshd
[...]
SEE ALSO
     ..., sshd_config(5), ...
 
$ man 5 sshd_config
/user
     AllowUsers
             This keyword can be followed by a list of user name patterns,
             separated by spaces.  If specified, login is allowed only for
             user names that match one of the patterns.  '*' and '?' can be
             used as wildcards in the patterns.  Only user names are valid; a
             numerical user ID is not recognized.  By default, login is
             allowed for all users.  If the pattern takes the form USER@HOST
             then USER and HOST are separately checked, restricting logins to
             particular users from particular hosts.
 
nnn
 
     DenyUsers
             This keyword can be followed by a list of user name patterns,
             separated by spaces.  Login is disallowed for user names that
             match one of the patterns.  '*' and '?' can be used as wildcards
             in the patterns.  Only user names are valid; a numerical user ID
             is not recognized.  By default, login is allowed for all users.
             If the pattern takes the form USER@HOST then USER and HOST are
             separately checked, restricting logins to particular users from
             particular hosts.
[End]
FILES
     /etc/ssh/sshd_config
             Contains configuration data for sshd.  This file should be
             writable by root only, but it is recommended (though not neces-
             sary) that it be world-readable.
q
$ su
Password: ******
# vim /etc/ssh/sshd_config
… a dál už to zvládneš sám.

Ale doporučuju použít AllowGroups a vytvořit si skupinu do které dáš ty, kterým bude přihlášení dovoleno.
Hello world ! Segmentation fault (core dumped)

Založit nové vláknoNahoru

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.