Re: how to prevent user to login via ssh or exec commands but allow to start ssh tunel
On Wed, Mar 09, 2005 at 09:19:27PM +0300, Artem Chuprina wrote:
> Victor Wagner -> debian-russian@lists.debian.org @ Wed, 9 Mar 2005 20:54:11 +0300:
>
> VW> ssh передаст эту команду на выполнение шеллу. Поэтому посредством
> VW> /bin/false хрен чего выполнишь. /bin/false не подходит по другой причине
> VW> - он сразу завершается. А туннель требует живой сессии.
>
> AFAIR openssh в режиме "только туннель" это не смущает. Он не запускает
> шелл при этом вообще - только соединяется, авторизуется, организует
> туннель и висит.
если к комм. строке ssh добавить -N то он не будет пытаться выполнить
какую-либо команду или шелл. Так что /bin/false поставить кажется достаточно.
Меня просто man от sshd смутили
===========
1. If the login is on a tty, and no command has been specified,
prints last login time and /etc/motd (unless prevented in the
configuration file or by $HOME/.hushlogin; see the FILES sec-
tion).
2. If the login is on a tty, records login time.
3. Checks /etc/nologin; if it exists, prints contents and quits
(unless root).
4. Changes to run with normal user privileges.
5. Sets up basic environment.
6. Reads $HOME/.ssh/environment if it exists.
7. Changes to user's home directory.
8. If $HOME/.ssh/rc exists, runs it; else if /etc/ssh/sshrc
exists, runs it; otherwise runs xauth. The ``rc'' files are
given the X11 authentication protocol and cookie in standard
input.
9. Runs user's shell or command.
===========
из пункта 9 непонятно как вызывается команда юзера - через шелл или напрямую.
И к томуже видел в каком-то списке рассылки про проблему что поставить
/bin/false не катит ибо (как в том письме было сказано) ssh вызывает шелл
даже для выполнения команд.
Спасибо за помощь большое!
--
Best regards,
-Vlad
Reply to: