aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-05-23 15:15:48 -0500
committerJesús <heckyel@hyperbola.info>2021-05-23 15:15:48 -0500
commit0cedeb0f68a4cf9a6f00a629cf3c951d08459bd2 (patch)
tree777174b8a08c41a1d8a1d7c401ffaae7c60d7c1e
parentf0ba596bb18abe7bb2cd69b4ada19f41f132d9d8 (diff)
downloadbook-0cedeb0f68a4cf9a6f00a629cf3c951d08459bd2.tar.lz
book-0cedeb0f68a4cf9a6f00a629cf3c951d08459bd2.tar.xz
book-0cedeb0f68a4cf9a6f00a629cf3c951d08459bd2.zip
[ssh]: update
-rw-r--r--ssh/README.md22
1 files changed, 15 insertions, 7 deletions
diff --git a/ssh/README.md b/ssh/README.md
index c2998d6..2646938 100644
--- a/ssh/README.md
+++ b/ssh/README.md
@@ -16,7 +16,7 @@ $ chmod 600 ~/.ssh/id_ed25519
To connect to a server, run:
-```
+```console
$ ssh -p port user@server-address
```
@@ -25,15 +25,17 @@ $ ssh -p port user@server-address
#### Copy SSH key
1. `sudo apt-get install xclip` or `sudo pacman -S xclip`
-2. `xclip -sel clip < ~/.ssh/id_rsa.pub`
+2. `xclip -sel clip < ~/.ssh/id_ed25519.pub`
#### Configuration
The client can be configured to store common options and hosts. All options can be declared globally or restricted to specific hosts. For example:
+```console
+$ nano -w ~/.ssh/config
+```
+
```bash
-nano -w ~/.ssh/config
--------------------------------
# host-specific options
Host myserver
HostName ssh.heckyel.ga
@@ -61,15 +63,21 @@ The SSH daemon configuration file can be found and edited in /etc/ssh/sshd_confi
To allow access only for some users add this line:
- AllowUsers user1 user2
+```bash
+AllowUsers user1 user2
+```
To allow access only for some groups:
- AllowGroups group1 group2
+```bash
+AllowGroups group1 group2
+```
To add a nice welcome message (e.g. from the /etc/issue file), configure the Banner option:
- Banner /etc/issue
+```bash
+Banner /etc/issue
+```
#### Securing the authorized_keys file