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.

SSH Password Auth.

Discussion in 'General Discussion' started by mickalo, Oct 8, 2006.

  1. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    765
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    N.W. Iowa
    Hello,

    If we enable the "SSH Password Auth" I assume I need to generate the private/public keys in order to login via SSH shell.

    I use Vandyke's SecureCRT & SecureFTP which generates it's own pub/private keys. Would I need to import them via the "Manage Keys" import function, then these would be used when I log in as root via the shell if we enable the SSH Password Auth?

    What do we need to do to allow anyone else login via the shell ... do we need to import separate pub/private keys for each person we allow shell access? As we sometimes need a outside service to work on the server from time to time, which requires root access via the shell?

    Not real clear how this SSH Password Auth actual works with the pub/private keys and where they would be stored on the server. Are they all stored in the /root/.ssh folder?

    TIA,
    Mickalo
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Here's a handy guide that uses putty as the client, but you should get the idea:
    http://www.unixwiz.net/techtips/putty-openssh.html#keypair

    Basically, you or anyone else logging in over SSH have their own private/public key pair generated on their PC SSH client. You must then put the public key generated in the client into the servers /root/.ssh/authorized_keys2 file. That's it.

    So for 3rd parties you need to ask them for their SSH public key to add to the server file to allow them access.
     
  3. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    765
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    N.W. Iowa
    so your saying the ALL the pub keys are stored in one file, the authorized_keys2 ?? Is there a specific format that each of these pub keys are appended to this file??

    Thx's
    Mickalo
     
  4. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    765
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    N.W. Iowa
    Well maybe someone may come up with a "How To" through for Cpanel/Whm in the future .. seems like a real hassle to set this up. :)

    Mickalo
     
  5. HostMerit

    HostMerit Well-Known Member

    Joined:
    Oct 24, 2004
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    New Jersey, USA
    cPanel Access Level:
    DataCenter Provider
    Quite easy, generate a key with something such as putty-gen, and create the file if it doesnt exist: /root/.ssh/authorized_keys and put the public version of the key in, on one line.

    Then use the private saved key version to access the server through a SSH client.

    PuTTY and PuTTY-gen can be downloaded at: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
     
  6. kilroy

    kilroy Active Member

    Joined:
    Jun 22, 2002
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    Where do I find the Manage SSH Keys feature? It doesn't show on my WHM menus.

    Roger
     
  7. mickalo

    mickalo Well-Known Member

    Joined:
    Apr 16, 2002
    Messages:
    765
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    N.W. Iowa
    Ok, I'll give it a try. I use Vandyke's SecureCRT which also generates these keys. wouldn't those also work?

    Then each public key has to be on it's own single line then? What about multiple pub keys, one on each line?

    Mickalo
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Yes, each public key goes on a separate line within the file.
     
  9. flash7

    flash7 Well-Known Member

    Joined:
    Feb 16, 2004
    Messages:
    203
    Likes Received:
    0
    Trophy Points:
    16
    Manage SSH Keys don't work?
     

    Attached Files:

Loading...

Share This Page