Skip to content

Instantly share code, notes, and snippets.

@andragabr
Forked from 2-718/gist:712288
Created August 3, 2018 10:14
Show Gist options
  • Save andragabr/a197b5e0d42297be56017edfe39a03e7 to your computer and use it in GitHub Desktop.
Save andragabr/a197b5e0d42297be56017edfe39a03e7 to your computer and use it in GitHub Desktop.

Revisions

  1. @2-718 2-718 revised this gist Dec 15, 2010. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions gistfile1.mkd
    Original file line number Diff line number Diff line change
    @@ -18,3 +18,9 @@
    Enter new passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved with the new passphrase.

    # Show fingerprint of specified public key
    $ ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub
    2048 fd:52:c5:f0:6b:b5:37:38:d7:93:e8:58:ab:bf:72:52 /etc/ssh/ssh_host_rsa_key.pub
    $ ssh-keygen -lf id_rsa.pub
    2048 e1:0a:a4:27:66:a7:6f:c8:77:cb:8d:d7:bd:f3:8f:d7 id_rsa.pub (RSA)
  2. @2-718 2-718 revised this gist Dec 13, 2010. 1 changed file with 13 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions gistfile1.mkd
    Original file line number Diff line number Diff line change
    @@ -5,3 +5,16 @@
    Passphrase: choose appropriate passphrase
    $ ssh-add EMAIL

    # Enable ssh-agent
    $ ssh-agent bash
    $ ssh-add ~/.ssh/id_rsa
    $ ssh username@remote

    # Change private ssh key passphrase
    $ ssh-keygen -p
    Enter file in which the key is (~/.ssh/id_rsa): test_key
    Enter old passphrase:
    Key has comment 'test_key'
    Enter new passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved with the new passphrase.
  3. @2-718 2-718 revised this gist Nov 23, 2010. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions gistfile1.mkd
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,5 @@
    $ ssh-keygen -t rsa -C "EMAIL"
    Filename: EMAIL
    Passphrase: choose appropriate passphrase
    $ mv EMAIL EMAIL.key
    $ ssh-add EMAIL.key
    $ ssh-add EMAIL

  4. 2-718 revised this gist Nov 23, 2010. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.mkd
    Original file line number Diff line number Diff line change
    @@ -4,4 +4,5 @@
    Filename: EMAIL
    Passphrase: choose appropriate passphrase
    $ mv EMAIL EMAIL.key
    $ ssh-add EMAIL
    $ ssh-add EMAIL.key

  5. 2-718 created this gist Nov 23, 2010.
    7 changes: 7 additions & 0 deletions gistfile1.mkd
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    # Generate ssh public keypair
    $ cd ~/.ssh
    $ ssh-keygen -t rsa -C "EMAIL"
    Filename: EMAIL
    Passphrase: choose appropriate passphrase
    $ mv EMAIL EMAIL.key
    $ ssh-add EMAIL