Results 1 to 5 of 5

Thread: SSH: How to generate public key from private key?

  1. #1
    Join Date
    Jan 2006
    Beans
    70

    SSH: How to generate public key from private key?

    According to this thread, I should be able to generate a public key to match a private key I already have:

    If you didn't notice, it generated another public key.This is the same key as is on your computer, as you can always generate your public key from your private key (but not the other way around).
    The author used something called puttygen.exe, which I assume is a windows program. How would I do in Ubuntu what he did?

  2. #2
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,958
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: SSH: How to generate public key from private key?

    Probably someone will beat me to this, but can I clarify one thing? Do you want to generate putty keys or openssh keys? The two are not interchangeable. They both work with ssh, but you can't for example use putty private and openssh public keys together. What client are you going to use to complete the ssh connection?

  3. #3
    Join Date
    Jan 2006
    Beans
    70

    Re: SSH: How to generate public key from private key?

    Nevermind. I think I figured it out. It's:
    Code:
    ssh-keygen -e

  4. #4
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,958
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: SSH: How to generate public key from private key?

    ssh-keygen -e -- This would imply open-ssh keys and not putty keys -- just an FYI

  5. #5
    MountainX's Avatar
    MountainX is offline Iced Blended Vanilla Crème Ubuntu
    Join Date
    Jan 2008
    Location
    A place with no mountains
    Beans
    1,610
    Distro
    Kubuntu

    Re: SSH: How to generate public key from private key?

    Quote Originally Posted by Westerberg View Post
    Nevermind. I think I figured it out. It's:
    Code:
    ssh-keygen -e
    I don't think that's the option you want. (I realize the question is old, so this comment is really for new people seeing the question.)

    The correct option would be
    Code:
    ssh-keygen -y
    Desktop: KX Studio (Kubuntu 12.04)
    Laptop & Netbook: Kubuntu 12.04
    Tablet: Samsung Galaxy Tab 10.1
    Phone: Nexus 4 Cyanogenmod

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
  •