Results 1 to 5 of 5

Thread: SSH Frustration

  1. #1
    Join Date
    Dec 2010
    Beans
    10

    SSH Frustration

    My level of frustration is reaching new highs -- all thanks to ssh (really all thanks to em not knowing what I am doing)

    First question is how do I update openssh to the most current version. I am showing that I have OpenSSH _5.5p1 Debian-4ubuntu5, OpenSSl 0.9.8o 01 June 2010 currently installed. I would like to update to OpenSSH 5.8 (most current version)

    Now, onto the real issue.

    I was setting up my account on GitHub and was having issues generating the keys. Via GitHub help page:

    Code:
    $ ssh-keygen -t rsa -C "your_email@youremail.com"
    A commenter on this forum suggested I sudo the above command. This solved my access issues and I was able to continue with the GitHub tutorial. I put the public key in my GitHub Account - but I cannot connect. When I try to connect using

    Code:
    $ ssh -T git@github.com
    I get the reply

    Code:
    Failed to add the host to the list of known hosts (/home/username (me)/.ssh/known_host)
    The only thing I am uncertain about is the difference between having the key pair stored in /root/.ssh/id_rsa versus /home/user (me)/.ssh/id_rsa

    The tutorial on the github help section shows /home/user (me)/.ssh/id_rsa

    The public key is now in the root directory, root@user




    Furthermore, I am showing two ssh directories on my computer. One of them is a .shh directory (hidden) under my user account and the other one is a SSH directory under root. All the config files and keys are in this root SSH (not hidden).

    Can anybody help me get all this ssh nonsense straightened out . Many thanks!!!

  2. #2
    Join Date
    Feb 2011
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: SSH Frustration

    Navigate to /home/username/.ssh and see if you have the file known_hosts and check the file permissions on it, also make sure that you own it. Check your permissions. Sometimes the file just doesn't exist and you may have to add it.

    You may also have to add to your command the location of the private key in order to connect to look something like this
    Code:
    ssh -i /home/username/.ssh/nameofkey git@gethub.com
    You may have to add the -v option to debug the problem that may be causing your problem logging in with keys.

  3. #3
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,791

    Re: SSH Frustration

    Don't understand SSH?

    Read the Snail Book:
    http://www.snailbook.com/

  4. #4
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,703

    Re: SSH Frustration

    I don't think you should be messing around with root's keys - I think you should be doing it all under your own account. So you should be able to run ssh-keygen in your own account. However, running keygen under sudo might have created keys in your home folder that are owned by root and therefore unreadable to you. Try the command "ls -l .ssh" and see who owns the files. If root does, use this command
    Code:
    sudo chown -R micajah:micajah .ssh
    to give ownership back to yourself (and using your proper username where I have put micajah of course).

  5. #5
    Join Date
    Feb 2011
    Beans
    6

    Re: SSH Frustration

    Quote Originally Posted by The Cog View Post
    Try the command "ls -l .ssh" and see who owns the files. If root does, use this command
    Code:
    sudo chown -R micajah:micajah .ssh
    to give ownership back to yourself (and using your proper username where I have put micajah of course).
    Great, that sorted it out for me too - thanks...

Tags for this Thread

Bookmarks

Posting Permissions

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