Results 1 to 11 of 11

Thread: Managing SSH Keys [Case 60035]

  1. #1
    Member
    Join Date
    Sep 2009
    Location
    Lusby, Maryland, United States
    Posts
    208

    Default Managing SSH Keys [Case 60035]

    Originally started this thread, but it is dead and caused confusion.
    http://forums.cpanel.net/showthread.php?t=145597

    The suggestion is to provide additional options within the Manage SSH Keys feature. I want to manage my configuration file and to manage options within my authorized keys.

    For maximum security, I ensure my keys are passphrase protected. However, scripts do not have the ability to enter passphrase. This means I need to have a single purpose key that is not passphrase protected. What I have opt'ed to do is edit the authorized_keys file to say From="192.168.1.123,192.168.1.124" before the ssh-dss to only allow that key to be used from those IPs. The problem lies in the fact that the key no longer displays properly in WHM, I can't add that option in WHM, and any changes to keys from WHM breaks this.

    It would also be ideal to allow us to edit the .ssh/config file from within WHM. This allows you to setup an alias for those connections in your scripts that specify odd port numbers, the IP addresses, and the key to use.

    Thanks,
    Frank

  2. #2
    Member
    Join Date
    Sep 2009
    Location
    Lusby, Maryland, United States
    Posts
    208

    Default re: Managing SSH Keys [Case 60035]

    Bump for more suggestions and/or visibility

  3. #3
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,562
    cPanel/WHM Access Level

    DataCenter Provider

    Arrow re: Managing SSH Keys [Case 60035]

    Quote Originally Posted by fkatzenb View Post
    Bump for more suggestions and/or visibility
    Please refrain from bumping a thread for the sole purpose of bumping a thread without offering a substantive contribution. I believe it will be more constructive to take time to consider a more thoughtful and unique post that helps further the discussion. I recommend to consider adding new information or additional reasoning, such as comparing different perspectives of the potential benefits or advantages, security-related or otherwise, that may help garner more interest and persuade others to vote for your feature request.

    I personally think your feature request is an excellent idea and I am sure that in due course more people will reply to vote or share additional comments and suggestions.

  4. #4
    Member
    Join Date
    Sep 2009
    Location
    Lusby, Maryland, United States
    Posts
    208

    Default re: Managing SSH Keys [Case 60035]

    Quote Originally Posted by cPanelDon View Post
    Please refrain from bumping a thread for the sole purpose of bumping a thread without offering a substantive contribution. I believe it will be more constructive to take time to consider a more thoughtful and unique post that helps further the discussion. I recommend to consider adding new information or additional reasoning, such as comparing different perspectives of the potential benefits or advantages, security-related or otherwise, that may help garner more interest and persuade others to vote for your feature request.

    I personally think your feature request is an excellent idea and I am sure that in due course more people will reply to vote or share additional comments and suggestions.
    Thanks Don.

    I decided to provide a more comprehensive list of things that would make managing keys and hosts significantly easier. I think option boxes within each place you generate the key that would allow you to specify the following:
    Code:
         from="pattern-list"
         command="command"
         environment="NAME=value"
         no-port-forwarding
         no-X11-forwarding
         no-agent-forwarding
         no-pty
         permitopen="host:port"
    
    http://man.he.net/man5/authorized_keys
    A second option either within the Manage SSH Keys or the Security Center to allow the editing of .ssh/config. This file is real simple and allows you to specify the host name, user, port, address, and key. For example:

    Code:
    Host server
    User admin
    Port 1234
    HostName server.mydomain.com
    IdentityFile /root/.ssh/single
    This would allow you to simply "ssh server" to immediately do all the leg work for you. When coupled with the authorized_key options above, you can specify a from="1.2.3.4" and have a single purpose key that has no passphrase that you can use with automated scripts and ensure maximum security.


    Thanks,
    Frank

  5. #5
    Member
    Join Date
    Sep 2009
    Location
    Lusby, Maryland, United States
    Posts
    208

    Default re: Managing SSH Keys [Case 60035]

    I would like to present further reasoning for having this feature implemented and more manageable.

    One of the big benefits is single purpose keys. For example, you can setup a key that is purely designed to run one script and that script contains two commands, "service mysql restart" and "exit", and has no password. This makes managing your services from say your smart phone with a SSH app a sinch. You establish a connection with this key and you are done.

  6. #6
    Member
    Join Date
    Sep 2009
    Location
    Lusby, Maryland, United States
    Posts
    208

    Default re: Managing SSH Keys [Case 60035]

    I would like to bring this subject back from the sidelines.

    Thanks,
    Frank

  7. #7
    Member
    Join Date
    Jan 2008
    Location
    Buenos Aires, Argentina
    Posts
    986
    cPanel/WHM Access Level

    Root Administrator

    Default re: Managing SSH Keys [Case 60035]

    Quote Originally Posted by fkatzenb View Post
    ... This makes managing your services from say your smart phone with a SSH app a sinch. You establish a connection with this key and you are done.
    +1 for this

  8. #8
    Member LeadDogGraphics's Avatar
    Join Date
    Feb 2012
    Location
    West Palm Beach, FL
    Posts
    91
    cPanel/WHM Access Level

    Root Administrator

    Default re: Managing SSH Keys [Case 60035]

    +1 Please consider this request, as there are other reasons for needing a login without a passphrase. The additional options as outlined above sound like a good way to implement it.

  9. #9
    Member monarobase's Avatar
    Join Date
    Jan 2010
    Location
    France
    Posts
    493
    cPanel/WHM Access Level

    Root Administrator

    Default re: Managing SSH Keys [Case 60035]

    +1 we need both the ability to allow a user to create keys without a password and allow users to set an allowed IP list per public key.

  10. #10
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,307
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Managing SSH Keys [Case 60035]

    Update: I have filed an internal case with our developers regarding this situation.

  11. #11
    Member
    Join Date
    Sep 2009
    Location
    Lusby, Maryland, United States
    Posts
    208

    Default Re: Managing SSH Keys [Case 60035]

    I would like to add to this suggestion please.

    When creating SSH keys for root or for users, when authorized link is clicked, can we have the ability to provide an expiration date and time on it? It would probably require the implementation of some tasks on the backend to remove that authorization, but in this day and age, every bit of security feature helps.

    Thanks,
    Frank

Similar Threads

  1. ssh keys - should public keys be removed? confused...
    By aww in forum cPanel & WHM Discussions
    Replies: 3
    Last Post: 09-22-2011, 09:17 AM
  2. [Case 47947] Can't create SSH Keys on cPanel User
    By chrislog in forum cPanel & WHM Discussions
    Replies: 23
    Last Post: 05-26-2011, 12:36 PM
  3. Managing #top in ssh
    By GaryT in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 05-26-2010, 02:47 PM
  4. How to connect in SSH after create key in Manage SSH Keys
    By konrath in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 07-03-2009, 10:57 PM
  5. SSH Keys
    By jhyland87 in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 06-13-2009, 09:40 AM

Tags for this Thread