Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2007
    Posts
    30

    SSH Keys... where is .ssh?

    I am currently running Cent OS 5...where do I find the directory or file to add my public key to?

  2. #2
    Join Date
    Mar 2003
    Location
    /root
    Posts
    23,991
    /etc/ssh


    Net

    Specially 4 U
    Reseller Hosting: Boost Your Websites | Fully Managed KVM VPS: 3.20 - 5.00 Ghz, Pure Dedicated Power
    JoneSolutions.Com is on the net 24/7 providing stable and reliable web hosting solutions, server management and services since 2001
    Debian|Ubuntu|cPanel|DirectAdmin|Enhance|Webuzo|Acronis|Estela|BitNinja|Nginx

  3. #3
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,681
    Quote Originally Posted by net View Post
    /etc/ssh


    Net


    um no.. you add the key into the users root directory/.ssh..

    basically

    ~/.ssh

    if the directory doesnt exist you must create it.

    mkdir ~/.ssh/
    chmod 644 ~/.ssh/
    touch ~/.ssh/authorized_keys
    chmod 644 ~/.ssh/authorized_keys


    add the key into ~/.ssh/authorized_keys
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

  4. #4
    It would be ~/.ssh default
    you can check it at /etc/ssh/sshd_config

  5. #5
    It might be worth noting for the next person who goes hunting for this that ~ indicates your home directory. For example my file on my laptop would be /home/sully/.ssh/config

    There are some very helpful options that you can throw in there.

  6. #6
    Join Date
    Jul 2007
    Posts
    30
    Ok so far I created that file and placed my public key inside and saved it

    How do I authorize this public key? IS there such a step?

    it says

    Using username "root".
    Server refused our key
    Last edited by circuscircus; 09-24-2007 at 01:56 PM.

  7. #7
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,681
    Quote Originally Posted by jsully View Post
    It might be worth noting for the next person who goes hunting for this that ~ indicates your home directory. For example my file on my laptop would be /home/sully/.ssh/config

    There are some very helpful options that you can throw in there.
    ~ will automatically link to the home directory, no need to replace it. The commands i provided are literal and all that is needed.
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

  8. #8
    Join Date
    Jul 2003
    Location
    Goleta, CA
    Posts
    5,566
    Are you using puttygen to create your public and private key pair?
    Patron: I'd like my free lunch please.
    Cafe Manager: Free lunch? Did you read the fine print stating it was an April Fool's joke.
    Patron: I read the same way I listen, I ignore the parts I don't agree with. I'm suing you for false advertising.
    Cafe Owner: Is our lawyer still working pro bono?

  9. #9
    Join Date
    Nov 2002
    Location
    WebHostingTalk
    Posts
    8,901
    * Moved to Technical and Security Issues....

    Sirius
    I support the Human Rights Campaign!
    Moving to the Tampa, Florida area? Check out life in the suburbs in Trinity, Florida.

  10. #10
    Join Date
    Nov 2001
    Location
    Philadelphia, Pa
    Posts
    948
    Is you desktop windows or linux? If windows, are you using putty? How did you generate the key? What are the perms on the .ssh folder and in the file that you put the key in? What file did you put the key in?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •