[ssh]: update
This commit is contained in:
parent
f0ba596bb1
commit
0cedeb0f68
@ -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:
|
||||
|
||||
```bash
|
||||
AllowUsers user1 user2
|
||||
```
|
||||
|
||||
To allow access only for some groups:
|
||||
|
||||
```bash
|
||||
AllowGroups group1 group2
|
||||
```
|
||||
|
||||
To add a nice welcome message (e.g. from the /etc/issue file), configure the Banner option:
|
||||
|
||||
```bash
|
||||
Banner /etc/issue
|
||||
```
|
||||
|
||||
#### Securing the authorized_keys file
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user