Skip to content

Instantly share code, notes, and snippets.

@martin-cotta
Last active August 29, 2018 04:57
Show Gist options
  • Select an option

  • Save martin-cotta/5c8b0ca4761c684ec69d98d6fff6f850 to your computer and use it in GitHub Desktop.

Select an option

Save martin-cotta/5c8b0ca4761c684ec69d98d6fff6f850 to your computer and use it in GitHub Desktop.

Revisions

  1. Martin Cotta revised this gist Aug 29, 2018. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions ssh-keys.sh
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,12 @@ ssh-keygen
    eval `ssh-agent`
    ssh-add -K ~/.ssh/id_rsa

    # Copy public key content
    pbcopy < ~/.ssh/id_rsa.pub

    # Verify configuration
    ssh -T git@bitbucket.org

    # So that your computer remembers your password each time it restarts,
    # open (or create) the ~/.ssh/config file and add these lines to the file:

  2. Martin Cotta revised this gist Aug 29, 2018. No changes.
  3. Martin Cotta created this gist Aug 29, 2018.
    12 changes: 12 additions & 0 deletions ssh-keys.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    # Generate public/private rsa key pair
    ssh-keygen

    # Add the key to the ssh-agent
    eval `ssh-agent`
    ssh-add -K ~/.ssh/id_rsa

    # So that your computer remembers your password each time it restarts,
    # open (or create) the ~/.ssh/config file and add these lines to the file:

    # Host *
    # UseKeychain yes