The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Jailshell on second SSH server

Discussion in 'Security' started by hitman47, Dec 10, 2011.

  1. hitman47

    hitman47 Registered

    Joined:
    Sep 2, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I have a shared server that is running two ssh servers on different ports - one server with the default configuration file (port 4000), and another with config file /etc/ssh/examplesshd_config and deamon at /etc/init.d/examplesshd (port 5000). The thing is that whenever I activate a jailshell for a client (using WHM), it will enable it for the default ssh server on port 4000 - I know this because I can login with their user/pass on 4000, but the same fail with permission denied on the second server on port 5000. Is there any way to edit the shell configuration, and enable jailshell access with the second ssh server for regular cPanel accounts?

    Thanks!
     
    #1 hitman47, Dec 10, 2011
    Last edited: Dec 10, 2011
  2. storminternet

    storminternet Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    462
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hi,

    Stop the default ssh server first and run the second ssh server. Try to access server through port 5000 just to confirm if you are able to access the server. If server is accessible at port 5000 then I hope jailshell will also work with this way.
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I believe this user is intentionally running two copies of SSH and likely doesn't want to shut down one of them. Is that the case hitman47?
     
  4. hitman47

    hitman47 Registered

    Joined:
    Sep 2, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Yes, that's right. One ssh server is resitricted to access from one IP, and it's used exclusively for root login, the other server won't have such restrictions, and will be given to clients, needing jailshell access. Would that be even possible on a cPanel system - to have jailshell enabling account access only for the second ssh server? I know where the jailshell binary is, but couldn't find any configuration file where this can be set up.
     
  5. hitman47

    hitman47 Registered

    Joined:
    Sep 2, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    problem solved, nothing additional needs to be done actually and should work be default. improper modifications were previously made to the second ssh server config file.
     
Loading...

Share This Page