Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
redhat:ssh-redhat:start [2019/01/18 14:19] – [Equip SSH Logins with MOTD and SSH-Banner Messages] michael | redhat:ssh-redhat:start [2020/09/03 12:12] (current) – michael | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Secure Shell - SSH unter Redhat / CentOS | + | ====== Secure Shell - SSH unter Redhat / CentOS |
**SSH** (oder ausgeschrieben **Secure SHell**) ist ein Protokoll, welches eine sichere Kommunikation zwischen zwei Systemen mittels einer Client/ | **SSH** (oder ausgeschrieben **Secure SHell**) ist ein Protokoll, welches eine sichere Kommunikation zwischen zwei Systemen mittels einer Client/ | ||
Line 10: | Line 11: | ||
**SSH** wurde als Ersatz für ältere, weniger sichere Terminalanwendungen, | **SSH** wurde als Ersatz für ältere, weniger sichere Terminalanwendungen, | ||
- | |||
- | ---- | ||
Line 50: | Line 49: | ||
</ | </ | ||
- | ---- | + | |
===== SSH für Key-Authentifizierung Konfigurieren und härten ===== | ===== SSH für Key-Authentifizierung Konfigurieren und härten ===== | ||
Line 156: | Line 155: | ||
</ | </ | ||
- | ---- | ||
Line 165: | Line 163: | ||
- | <wrap em> | + | <WRAP center round tip 100%> |
+ | '' | ||
* '' | * '' | ||
* '' | * '' | ||
+ | </ | ||
- | I strongly recommended all system administrator to display a banner messages before allowing users to log in to systems. | ||
+ | <WRAP center box 100%> | ||
+ | ==== motd - Display SSH Warning Message - After User Login ==== | ||
+ | Das Akronym **motd** steht für message of the day. Diese Datei, welche vom Login-Programm benutzt wird, befindet sich im Konfigurationsverzeichnis unter ''/ | ||
+ | Zur Information für etwaige Neugierige und Remoteuser, oder beides, je nach Betrachtungsweise, | ||
- | ==== Display SSH Warning Message - Before User Login ==== | + | < |
- | To display Welcome or Warning message for SSH users before login; We use '' | + | |
+ | <sxh plain;> | ||
+ | ############################################################################## | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | ############################################################################## | ||
+ | </ | ||
+ | |||
+ | War die Datei zuvor noch nicht vorhanden, so passen wir die Berechtigungen noch wie folgt an: | ||
+ | |||
+ | < | ||
+ | # chmod 644 / | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP center box 100%> | ||
+ | ==== issue.net - Display SSH Warning Message - Before User Login ==== | ||
+ | |||
+ | Mit Hilfe dieser Datei ''/ | ||
- | - **Add the this banner sample message and save the file.** //You can add as well any custom banner message to this file.// <WRAP center box 100%> | ||
< | < | ||
# vim / | # vim / | ||
</ | </ | ||
- | |||
<sxh plain;> | <sxh plain;> | ||
- | ############################################################### | + | ############### |
- | # | + | # |
- | # | + | # |
- | # All connections are monitored and recorded | + | # |
- | # | + | # |
- | ############################################################### | + | # |
+ | # | ||
+ | # | ||
+ | # # | ||
+ | ############### | ||
</ | </ | ||
- | </WRAP> | + | |
- | - **Open the master ssh configuration file and enable banners**. <WRAP center box 100%> | + | Die Berechtigungen passen wir dann wie folgt an: |
+ | |||
+ | <code> | ||
+ | # chown root:root /etc/issue.net | ||
+ | # chmod 644 / | ||
+ | </code> | ||
+ | |||
+ | Abschliessend ergänzen wir noch in der ''/ | ||
< | < | ||
# vim / | # vim / | ||
Line 206: | Line 244: | ||
Banner / | Banner / | ||
</ | </ | ||
- | </ | ||
- | - **Finally, restart the SSH daemon** to reflect new changes. < | ||
- | - <wrap em>Try to connect to server you will see banner message, similar to below</ | ||
+ | Nun fehlt nur noch der Restart des SSH Daemon: | ||
+ | |||
+ | < | ||
+ | </ | ||
- | ==== Display SSH Warning Message - After User Login ==== | ||