1 |
A. Khattri wrote: |
2 |
> On Sun, 6 Aug 2006, Mike Williams wrote: |
3 |
> |
4 |
>> On Sunday 06 August 2006 18:45, fire-eyes wrote: |
5 |
>>> I would like to give a user an account, however with zero shell abilities. |
6 |
>>> What I am looking to do is give them the ability to set up a SOCKS proxy |
7 |
>>> tunnel over SSH, which is done with the -D flag. |
8 |
>>> |
9 |
>>> I have tried setting the shell to nologin or false, no go. I am not |
10 |
>>> interested in setting up a chroot jail for this user. |
11 |
>>> |
12 |
>>> Any ideas? |
13 |
>> You want the little known extra features of authorized_keys. |
14 |
>> |
15 |
>> Add command="/usr/bin/sleep",no-pty to the same line as the users key, before |
16 |
>> the key itself, i.e. |
17 |
>> command="/usr/bin/sleep",no-pty ssh-rsa AAAA...== user@host |
18 |
>> When the user logs in the command will be run, regardless of what the user |
19 |
>> asks for, and they'll get no pty so couldn't issue any commands interactively |
20 |
>> anyway. |
21 |
>> Remember, however long you set sleep to sleep is how long the session will |
22 |
>> remain open. |
23 |
>> |
24 |
>> 2 other options for authorized_keys I know of are no-port-forwarding and |
25 |
>> no-X11-forwarding. |
26 |
> |
27 |
> |
28 |
> Or you can just use rssh as the login shell... |
29 |
|
30 |
Tried that, but i couldn't figure out the configuration and it was quite |
31 |
confusing. The above trick worked fine. |
32 |
|
33 |
-- |
34 |
gentoo-server@g.o mailing list |