diff options
Diffstat (limited to 'ssh/README.md')
-rw-r--r-- | ssh/README.md | 22 |
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 |