From 9ec0623f29bc88eceec57c79de90899470809b17 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 30 Jul 2022 10:28:44 +0800 Subject: [PATCH] docs: fix format Signed-off-by: Bo-Yi Wu --- README.md | 60 +++++++++---------------------------------------------- 1 file changed, 9 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index 9fa93f0..1f9141d 100644 --- a/README.md +++ b/README.md @@ -66,82 +66,40 @@ SSH Proxy Setting: * proxy_fingerprint - fingerprint SHA256 of the host public key, default is to skip verification * proxy_use_insecure_cipher - include more ciphers with use_insecure_cipher (see [#15](https://github.com/appleboy/scp-action/issues/15)) -### Setting up a 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: -
-rsa -

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

-
- -
-ed25519 -

- -```bash +# ed25519 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 +# rsa cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys' -``` -

-
- -
-ed25519 -

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

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

- ```bash +# rsa clip < ~/.ssh/id_rsa -``` -

-
- -
-ed25519 -

- -```bash +# ed25519 clip < ~/.ssh/id_ed25519 ``` -

-
- See the detail information about [SSH login without password](http://www.linuxproblem.org/art_9.html). **A note** from one of our readers: Depending on your version of SSH you might also have to do the following changes: @@ -158,8 +116,8 @@ If you are currently using OpenSSH and are getting the following error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey] ``` -Make sure that your key algorithm of choice is supported. On Ubuntu 20.04 or later you must explicitly allow the use of the ssh-rsa algorithm. Add the following line to your OpenSSH daemon file (which is either `/etc/ssh/sshd_config` or a drop-in file under -`/etc/ssh/sshd_config.d/`): +Make sure that your key algorithm of choice is supported. +On Ubuntu 20.04 or later you must explicitly allow the use of the ssh-rsa algorithm. Add the following line to your OpenSSH daemon file (which is either `/etc/ssh/sshd_config` or a drop-in file under `/etc/ssh/sshd_config.d/`): ```bash CASignatureAlgorithms +ssh-rsa