User Tools

Site Tools


ssh:configuring_sshd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ssh:configuring_sshd [2016/10/17 14:47] peterssh:configuring_sshd [2019/12/04 21:22] (current) – removed peter
Line 1: Line 1:
-====== SSH - Configuring sshd ====== 
- 
-===== Disable logins for the **root** user, only allow login for the core user and disable password based authentication. ===== 
- 
-permissions: 0600 
-owner: root:root 
- 
-<file bash /etc/ssh/sshd_config> 
-# Use most defaults for sshd configuration. 
-UsePrivilegeSeparation sandbox 
-Subsystem sftp internal-sftp 
- 
-PermitRootLogin no 
-AllowUsers core 
-PasswordAuthentication no 
-ChallengeResponseAuthentication no 
-</file> 
- 
- 
-===== Changing the sshd port ===== 
- 
-With socket-activated SSH by default. The configuration for this can be found at **/usr/lib/systemd/system/sshd.socket**.  
- 
-<file bash /usr/lib/systemd/system/sshd.socket> 
-[Socket] 
-ListenStream=2222 
-FreeBind=true 
-Accept=yes 
-</file> 
- 
-**sshd** will now listen only on port 2222 on all interfaces when the system is built. 
- 
- 
-Multiple ListenStream lines can be specified, in which case sshd will listen on all the specified sockets: 
- 
-<file bash /usr/lib/systemd/system/sshd.socket> 
-[Socket] 
-ListenStream=2222 
-ListenStream=10.20.30.40:2223 
-FreeBind=true 
-</file> 
  
ssh/configuring_sshd.1476715668.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki