Fórum Root.cz

Hlavní témata => Server => Téma založeno: Martin Hlaváček 22. 07. 2010, 16:58:43

Název: Restricted shell na Debianu
Přispěvatel: Martin Hlaváček 22. 07. 2010, 16:58:43
Dobrý den, potřeboval bych udělat na debian serveru to, aby vybraní uživatelé se mohli na server z venčí pouze přihlásit přes ssh a po přihlášení zase použít jen ssh pro přihlášení na jiný vnitřní server. Nic jiného. Na solarisu jsem to řešil pomocí restricted shell, ale na debianu rssh povoluje pouze scp, sftp přístup :(

Na solarisu to bylo jednoduche, tam sem vytvořil toho uživatele přidal jsem mu retricted shell (do passwd /usr/lib/rsh) a pak v jeho profilu mu dal do PATH adresař, kde byl byla pouze aplikace ssh. Takto podobně bych to pravě chtěl vyřešit na tom debianu.

Napadá vás něco?

Děkuji za radu.
Název: Re: Restricted shell na debianu
Přispěvatel: Ahmul 22. 07. 2010, 20:31:49
Co dát jako shell aplikaci, do které půjde zadat jen hostname/ip?:)
Název: Re: Restricted shell na Debianu
Přispěvatel: earlcash 23. 07. 2010, 12:50:24
Co treba pouzit chroot? http://www.howtoforge.com/chrooted_ssh_howto_debian_p2
Název: Re: Restricted shell na Debianu
Přispěvatel: trubicoid2 23. 07. 2010, 13:29:50
no a co kdyby se prihlasovali jen jednou primo na ten vnitrni server? udelas proste na brane port forward xxx -> 21 vnitrni server

nebo je tech vnitnich serveru moc?
Název: Re: Restricted shell na Debianu
Přispěvatel: alfi 23. 07. 2010, 14:15:19
co třeba tohle? :-)
$ man authorized_keys
AUTHORIZED_KEYS FILE FORMAT
     command="command"
             Specifies that the command is executed whenever this key is used for authentication.  The command supplied by the user (if any) is ignored.  The command is
             run on a pty if the client requests a pty; otherwise it is run without a tty.  If an 8-bit clean channel is required, one must not request a pty or should
             specify no-pty.  A quote may be included in the command by quoting it with a backslash.  This option might be useful to restrict certain public keys to per‐
             form just a specific operation.  An example might be a key that permits remote backups but nothing else.  Note that the client may specify TCP and/or X11
             forwarding unless they are explicitly prohibited.  The command originally supplied by the client is available in the SSH_ORIGINAL_COMMAND environment vari‐
             able.  Note that this option applies to shell, command or subsystem execution.
Název: Re: Restricted shell na Debianu
Přispěvatel: JardaP . 24. 07. 2010, 08:07:34
Co tohle? http://olivier.sessink.nl/jailkit/howtos_ssh_only.html Bohuzel, bude to chtit rucni instalaci, v Debianu neni. Mozna by se vam jeste hodilo podivat se na man rbash, jak uzivateli dale opilovat prava.
Název: Re: Restricted shell na Debianu
Přispěvatel: Martin Hlaváček 24. 07. 2010, 11:39:33
zkusim jsem jailkit, takto sem si to nejak predstavoval, dekuji
Název: Re: Restricted shell na Debianu
Přispěvatel: jose 25. 07. 2010, 20:18:35
http://www.abclinuxu.cz/poradna/linux/show/309671