Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-12-2011, 08:54 PM
|
#1
|
Member
Registered: Jun 2001
Posts: 302
Rep:
|
Allow ssh tunnel but disallow shell
I need a to allow a user to tunnel an ssh session but disallow them a bash shell.
# chsh -s /sbin/nologin {username} won't cut it...?
would permissions be the way to go with it? But how? Setup a group and add the user to that group? Or add all other users to that group... I'm confused
I don't need to chain to a new server unlike previous questions asked here.
|
|
|
03-12-2011, 10:22 PM
|
#2
|
LQ Guru
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 6,006
|
Allow user tunnel without shell.
Why?
I can think of no situation where a tunnel would be of significant use without a shell.
Encrypted sessions, chroot (actual or ssh/style), sftp-only, or restricted shell accounts I can understand, but why a tunnel-only account?
Check out IBSH (Iron Bound Shell) to see if it might serve your real purpose.
|
|
|
03-13-2011, 12:22 PM
|
#3
|
Member
Registered: Jun 2001
Posts: 302
Original Poster
Rep:
|
I have friends behind various firewalls (Libya, Australia, China & a few work environements). I trust them enough to let them use my dynamic port forwarding but IŽd rather not allow them a user account on the shell, fair point though
|
|
|
03-14-2011, 10:18 AM
|
#4
|
LQ Guru
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 6,006
|
proxy in disguise
I think that there are better ways to do it, but if that is what you want ...
Install IBSH and make it the shell for those accounts, then configure it so that the only commands they can run are 'exit' and 'logout'.
Permit their tunnel(s).
I would also set up automatic cleansing of the logs daily, so that I help no trace of their activity more than a few hours old.
|
|
|
All times are GMT -5. The time now is 01:01 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|