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.

Cannot access SSH

Discussion in 'General Discussion' started by hisham.i, Jan 4, 2012.

  1. hisham.i

    hisham.i Active Member

    Joined:
    Mar 15, 2011
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Hello,
    I want to access SSH in order to stop a process running on the server, and this is the first time i do this.
    I watched the video tutorial (cpanel tutorial) in order to generate a key, and i generated a key, but i cannot access the command page ( black page), and there is no applet that runs in order to start sending commands through.

    How can i open ssh command window?

    Thanks for your help
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,480
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    If you know the name of the process you are able to "kill" it via WHM. Login to WHM, top right corner click the Load Averages: link. On the page that opens you'll find (Kill) links next to each process.

    Be careful here.
     
  3. hisham.i

    hisham.i Active Member

    Joined:
    Mar 15, 2011
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    It is a program that i ran which listen for connection to specific port.
    I don't have WHM in my account, is there another way?
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,480
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    How did you install something on the server without root access? You might try accessing WHM from:
    /https://your.server.com:2087

    Using your root or Reseller login details.

    Only your Host or Server Administrator would be able to tell you if you have access to connect via SSH. This is normally not an option for Website owners.
     
  5. hisham.i

    hisham.i Active Member

    Joined:
    Mar 15, 2011
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Maybe i didn't understand what whm is, but yes i login with my user name and password, and put the file in webinf folder.
    I downloaded putty and make ssh key but how i then have to connect to server using putty?
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,480
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  7. hisham.i

    hisham.i Active Member

    Joined:
    Mar 15, 2011
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Thank you
    I read the link SSH/Shell Access
    and i downloaded putty but when i accessed it i got this message :
    "Shell access is not enabled in your account!
    If you need shell access please contact support."

    Which support from the server or here in cpanel?

    Thanks
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  9. hisham.i

    hisham.i Active Member

    Joined:
    Mar 15, 2011
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Let me tell you why i want to use ssh, because i really don't know if this is possible or not.
    I added a program on the server which listens for a connection on specific port, and i want to stop this program so i decided to use SSH to stop this process.
    Can I stop this program using SSH?
    Thanks
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Yes, you can kill processes via SSH. However, you should consult with your web hosting provider if you do not have root access to the system. It's possible the application is not even running if it does not have sufficient permissions.

    Thank you.
     
  11. hisham.i

    hisham.i Active Member

    Joined:
    Mar 15, 2011
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Thank you,
    I asked the server for enabling ssh and it is enabled now.
    But i have another question, i used "top" command to see the process that are running and i found tomcat one of these processes.
    Now i want to stop a program that is running using tomcat and not tomcat.
    How can i know its id to stop it?
     
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You can determine the PID of a process using a commands such as:

    Code:
    # pidof process-name
    # ps auxf
    However, please note that you will not be able to kill processes unless that are owned by the username of your account.

    Thank you.
     
  13. hisham.i

    hisham.i Active Member

    Joined:
    Mar 15, 2011
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    But do you think it is logical to ask the server support to stop the program each time i want to stop a program?
     
  14. 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
    If you have a program you want to stop running that is being processed by Tomcat, simply remove the file from the account. That will stop it from running again.

    If it is currently running and looped because you were testing on a production machine when testing normally would need to occur locally, then they will likely need to restart Tomcat. If you do not have access to restart Tomcat yourself, ask your hosting provider to do so via command line.
     
Loading...

Share This Page