Restricted shell na Debianu

Martin Hlaváček

Restricted shell na Debianu
« kdy: 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.


Ahmul

Re: Restricted shell na debianu
« Odpověď #1 kdy: 22. 07. 2010, 20:31:49 »
Co dát jako shell aplikaci, do které půjde zadat jen hostname/ip?:)

earlcash

Re: Restricted shell na Debianu
« Odpověď #2 kdy: 23. 07. 2010, 12:50:24 »

trubicoid2

Re: Restricted shell na Debianu
« Odpověď #3 kdy: 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?

alfi

Re: Restricted shell na Debianu
« Odpověď #4 kdy: 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.


JardaP .

  • *****
  • 11 064
Re: Restricted shell na Debianu
« Odpověď #5 kdy: 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.

Martin Hlaváček

Re: Restricted shell na Debianu
« Odpověď #6 kdy: 24. 07. 2010, 11:39:33 »
zkusim jsem jailkit, takto sem si to nejak predstavoval, dekuji

jose