Skip to content

Commit 51b83ba

Browse files
committed
docs: format
1 parent 4958308 commit 51b83ba

File tree

1 file changed

+8
-39
lines changed

1 file changed

+8
-39
lines changed

README.md

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ See [action.yml](./action.yml) for more detailed information.
2020
* `sync` - synchronous execution if multiple hosts, default is false
2121
* `timeout` - timeout for ssh to remote host, default is `30s`
2222
* `command_timeout` - timeout for ssh command, default is `10m`
23-
* `key` - content of ssh private key. ex raw content of ~/.ssh/id_rsa, remember include the BEGIN and END lines
23+
* `key` - content of ssh private key. ex raw content of ~/.ssh/id_rsa, remember include the BEGIN and END lines
2424
* `key_path` - path of ssh private key
2525
* `fingerprint` - fingerprint SHA256 of the host public key, default is to skip verification
2626
* `script` - execute commands
@@ -85,76 +85,46 @@ Make sure to follow the below steps while creating SSH Keys and using them.
8585
The best practice is create the SSH Keys on local machine not remote machine.
8686
Login with username specified in Github Secrets. Generate a RSA Key-Pair:
8787

88-
<details>
89-
<summary>rsa</summary>
90-
<p>
88+
rsa
9189

9290
```bash
9391
ssh-keygen -t rsa -b 4096 -C "[email protected]"
9492
```
9593

96-
</p>
97-
</details>
98-
99-
<details>
100-
<summary>ed25519</summary>
101-
<p>
94+
ed25519
10295

10396
```bash
10497
ssh-keygen -t ed25519 -a 200 -C "[email protected]"
10598
```
10699

107-
</p>
108-
</details>
109-
110100
Add newly generated key into Authorized keys. Read more about authorized keys [here](https://www.ssh.com/ssh/authorized_keys/).
111101

112-
<details>
113-
<summary>rsa</summary>
114-
<p>
102+
rsa
115103

116104
```bash
117105
cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'
118106
```
119107

120-
</p>
121-
</details>
122-
123-
<details>
124-
<summary>ed25519</summary>
125-
<p>
108+
ed25519
126109

127110
```bash
128111
cat .ssh/id_ed25519.pub | ssh b@B 'cat >> .ssh/authorized_keys'
129112
```
130113

131-
</p>
132-
</details>
133-
134114
Copy Private Key content and paste in Github Secrets.
135115

136-
<details>
137-
<summary>rsa</summary>
138-
<p>
116+
rsa
139117

140118
```bash
141119
clip < ~/.ssh/id_rsa
142120
```
143121

144-
</p>
145-
</details>
146-
147-
<details>
148-
<summary>ed25519</summary>
149-
<p>
122+
ed25519
150123

151124
```bash
152125
clip < ~/.ssh/id_ed25519
153126
```
154127

155-
</p>
156-
</details>
157-
158128
See the detail information about [SSH login without password](http://www.linuxproblem.org/art_9.html).
159129

160130
**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:
171141
ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey]
172142
```
173143

174-
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
175-
`/etc/ssh/sshd_config.d/`):
144+
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/`):
176145

177146
```bash
178147
CASignatureAlgorithms +ssh-rsa

0 commit comments

Comments
 (0)