From 074821ffc9e16276b8267424cd5480cbd54cd149 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Fri, 15 Dec 2017 23:26:40 -0500 Subject: [PATCH] Add SSH to commands.md --- help/commands.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/help/commands.md b/help/commands.md index ccd40e2..66e2fd5 100644 --- a/help/commands.md +++ b/help/commands.md @@ -141,6 +141,18 @@ Note that you can run multiple servers on different ports through Jekyll and oth - Copy the result of any command to the global clipboard: `command | xclip -sel clip` - Paste the results from the global clipboard: `xclip -o -sel clip` +### Secure Shell + +- Make a new 4096-bit RSA key: `ssh-keygen -t rsa -b 4096 [-C ]` + - Note that `id_rsa` is your private key and `id_rsa.pub` is your public key +- Add your new key to SSH: `ssh-add ~/.ssh/id_rssa` +- Copy your public key: `xclip -sel clip < ~/.ssh/id_rsa.pub` +- Add a location to your known hosts: `ssh -T ` + - For example, if you wanted to use SSH with GitHub, you would add the location `git@gitlab.com` +- Start the SSH agent: `eval "$(ssh-agent -s)"` + +Note that a git repository must be cloned with SSH if you want to use SSH with it. + ### Dealing with Archives - Zip all files in a directotry: `zip -r `