Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3406450
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:37:46+00:00 2026-05-18T05:37:46+00:00

So I have been working on this for some time. Would like to know

  • 0

So I have been working on this for some time. Would like to know if there is a better way or if I am on the right track.

I would basically like to allow some users to login to my server via SSH and then have a squid tunnel via that SSH connection.

The tricky part however is that I dont want these users to be able to execute ANY commands. I mean NOTHING at all.

So at this stage I have setup a Jail via – jailkit. The specific user is then placed in the jail and given the bash shell as a shell.

The next step would be to remove all the commands in the /jail/bin/ directories etc so that they are not able to execute any commands.

Am I on the right path here? What would you suggest?

Also…I see that it will give them many command not found errors…how do I remove these.

Is there any other shell I could look at giving them that would not let them do anything?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T05:37:46+00:00Added an answer on May 18, 2026 at 5:37 am

    You could set their shell to something like /bin/true, or maybe a simple script that will output an informational message, and then have them logon using ssh -N (see the ssh manual page). I believe that allows them to use portforwarding without having an actuall shell on the system.

    EDIT:

    The equivalent of ssh -N in PuTTY is checking the “Don’t start a shell or command at all” checkbox in its SSH configuration tab (Connection->SSH).

    EDIT2:

    As an alternative to this you could use a script that enters an infinite sleep loop. Until it is interrupted using Ctrl-C the connection will remain alive. I just tried this:

    #!/bin/sh
    
    echo "DNSH: Do-Nothing Shell"
    
    while sleep 3600; do :; done
    

    If you use this as a shell (preferrably with a more helpful message) your users will be able to use port-forwarding without an actual shell and without having to know about ssh -N and friends.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on this for some time now and just cant quite
I have been working on this for some time. The script does work and
I have been working on a project for some time now, and I decided
I have been looking for quite some time for an answer to this, and
I have an Eclipse project I've been working on for some time now, and
I've been working with MVC 1 for some time now and have decided to
I've been working for some time on my first website. I have the CSS
Have been working on this question for a couple hours and have come close
I have been working on this app for at least 3-4 months and just
I have been working on this sort of ATM (With a maximum of 50

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.