From 38cad7f0a8a2a2b237e19ee5741071dd2ad783ce Mon Sep 17 00:00:00 2001 From: h1dden-da3m0n <33120068+h1dden-da3m0n@users.noreply.github.com> Date: Sat, 3 Apr 2021 20:21:21 +0200 Subject: [PATCH] add ed25519 ssh key generation instructions --- README.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 58 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 42960e5..d3980df 100644 --- a/README.md +++ b/README.md @@ -79,28 +79,82 @@ out: *** ============================================== ``` -### Setting up SSH Key +### Setting up a SSH Key Make sure to follow the below steps while creating SSH Keys and using them. The best practice is create the SSH Keys on local machine not remote machine. Login with username specified in Github Secrets. Generate a RSA Key-Pair: - ```bash - ssh-keygen -t rsa -b 4096 -C "your_email@example.com" - ``` +
+rsa +

+ +```bash +ssh-keygen -t rsa -b 4096 -C "your_email@example.com" +``` + +

+
+ +
+ed25519 +

+ +```bash +ssh-keygen -t ed25519 -a 200 -C "your_email@example.com" +``` + +

+
Add newly generated key into Authorized keys. Read more about authorized keys [here](https://www.ssh.com/ssh/authorized_keys/). +
+rsa +

+ ```bash cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys' ``` +

+
+ +
+ed25519 +

+ +```bash +cat .ssh/id_ed25519.pub | ssh b@B 'cat >> .ssh/authorized_keys' +``` + +

+
+ Copy Private Key content and paste in Github Secrets. +
+rsa +

+ ```bash clip < ~/.ssh/id_rsa ``` +

+
+ +
+ed25519 +

+ +```bash +clip < ~/.ssh/id_ed25519 +``` + +

+
+ See the detail information about [SSH login without password](http://www.linuxproblem.org/art_9.html) ### Example