Gentoo Archives: gentoo-server

From: Mike Williams <mike@××××××××.uk>
To: gentoo-server@l.g.o
Subject: Re: [gentoo-server] Login: Allow ssh -D without a shell?
Date: Sun, 06 Aug 2006 18:19:07
Message-Id: 200608061908.19005.mike@gaima.co.uk
In Reply to: [gentoo-server] Login: Allow ssh -D without a shell? by fire-eyes
1 On Sunday 06 August 2006 18:45, fire-eyes wrote:
2 > I would like to give a user an account, however with zero shell abilities.
3 > What I am looking to do is give them the ability to set up a SOCKS proxy
4 > tunnel over SSH, which is done with the -D flag.
5 >
6 > I have tried setting the shell to nologin or false, no go. I am not
7 > interested in setting up a chroot jail for this user.
8 >
9 > Any ideas?
10
11 You want the little known extra features of authorized_keys.
12
13 Add command="/usr/bin/sleep",no-pty to the same line as the users key, before
14 the key itself, i.e.
15 command="/usr/bin/sleep",no-pty ssh-rsa AAAA...== user@host
16 When the user logs in the command will be run, regardless of what the user
17 asks for, and they'll get no pty so couldn't issue any commands interactively
18 anyway.
19 Remember, however long you set sleep to sleep is how long the session will
20 remain open.
21
22 2 other options for authorized_keys I know of are no-port-forwarding and
23 no-X11-forwarding.
24
25 --
26 Mike Williams
27 --
28 gentoo-server@g.o mailing list

Replies

Subject Author
Re: [gentoo-server] Login: Allow ssh -D without a shell? fire-eyes <sgtphou@×××××××××.org>