Last active
December 19, 2015 06:09
-
-
Save tamboer/5909181 to your computer and use it in GitHub Desktop.
ssh cheatsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| REMOVE KEY | |
| ssh-keygen -R hostname //remove a key for a host | |
| cd ~/.ssh | |
| ssh-keygen -t rsa -C "your_email@example.com" | |
| # Creates a new ssh key, using the provided email as a label | |
| # Generating public/private rsa key pair. | |
| # Enter file in which to save the key (/home/you/.ssh/id_rsa): | |
| Now you need to enter a passphrase. | |
| # Enter passphrase (empty for no passphrase): [Type a passphrase] | |
| # Enter same passphrase again: [Type passphrase again] | |
| Which should give you something like this: | |
| # Your identification has been saved in /home/you/.ssh/id_rsa. | |
| # Your public key has been saved in /home/you/.ssh/id_rsa.pub. | |
| # The key fingerprint is: | |
| # 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db your_email@example.com | |
| COPY | |
| sudo apt-get install xclip | |
| # Downloads and installs xclip. If you don't have `apt-get`, you might need to use another installer (like `yum`) | |
| xclip -sel clip < ~/.ssh/id_rsa.pub | |
| # Copies the contents of the id_rsa.pub file to your clipboard | |
| TEST CONNECTION | |
| ssh -T git@github.com | |
| CLONE | |
| git clone git@github.com:user/gitname.git | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment