mirror of
https://gitea.com/actions/appleboy-ssh-action.git
synced 2024-11-25 19:49:36 +01:00
docs: format
This commit is contained in:
parent
495830820f
commit
51b83ba474
1 changed files with 8 additions and 39 deletions
45
README.md
45
README.md
|
@ -85,76 +85,46 @@ 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.
|
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:
|
Login with username specified in Github Secrets. Generate a RSA Key-Pair:
|
||||||
|
|
||||||
<details>
|
rsa
|
||||||
<summary>rsa</summary>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
|
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
|
||||||
```
|
```
|
||||||
|
|
||||||
</p>
|
ed25519
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>ed25519</summary>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
|
ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
|
||||||
```
|
```
|
||||||
|
|
||||||
</p>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
Add newly generated key into Authorized keys. Read more about authorized keys [here](https://www.ssh.com/ssh/authorized_keys/).
|
Add newly generated key into Authorized keys. Read more about authorized keys [here](https://www.ssh.com/ssh/authorized_keys/).
|
||||||
|
|
||||||
<details>
|
rsa
|
||||||
<summary>rsa</summary>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'
|
cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'
|
||||||
```
|
```
|
||||||
|
|
||||||
</p>
|
ed25519
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>ed25519</summary>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cat .ssh/id_ed25519.pub | ssh b@B 'cat >> .ssh/authorized_keys'
|
cat .ssh/id_ed25519.pub | ssh b@B 'cat >> .ssh/authorized_keys'
|
||||||
```
|
```
|
||||||
|
|
||||||
</p>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
Copy Private Key content and paste in Github Secrets.
|
Copy Private Key content and paste in Github Secrets.
|
||||||
|
|
||||||
<details>
|
rsa
|
||||||
<summary>rsa</summary>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
clip < ~/.ssh/id_rsa
|
clip < ~/.ssh/id_rsa
|
||||||
```
|
```
|
||||||
|
|
||||||
</p>
|
ed25519
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary>ed25519</summary>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
clip < ~/.ssh/id_ed25519
|
clip < ~/.ssh/id_ed25519
|
||||||
```
|
```
|
||||||
|
|
||||||
</p>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
See the detail information about [SSH login without password](http://www.linuxproblem.org/art_9.html).
|
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:
|
**A note** from one of our readers: Depending on your version of SSH you might also have to do the following changes:
|
||||||
|
@ -171,8 +141,7 @@ If you are currently using OpenSSH and are getting the following error:
|
||||||
ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey]
|
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
|
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/`):
|
||||||
`/etc/ssh/sshd_config.d/`):
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
CASignatureAlgorithms +ssh-rsa
|
CASignatureAlgorithms +ssh-rsa
|
||||||
|
|
Loading…
Reference in a new issue