Ssh Server Configuration


Table of Contents

sshd server configuration for Slackware 
ssh server configuration 
Starting server 
Install server only 
.ssh/rc file 
Logging with ssh 
Different kinds of errors 
Bad file modes 
Test Installation History 
pkg:zlib 
cmd:PAM (Pluggable Authentication Modules) 
Installation 
pkg:OpenSSL 
X11 forwarding 
Request 
Respond 
ssh tunnel trickery 

sshd server configuration for Slackware 

Slackware does bare minimum configuration of the sshd server. The whole '/etc/ssh/sshd_config' file only contains the following 2 line if all the comments are removed:

Protocol 2
Subsystem       sftp    /usr/libexec/sftp-server

To ensure maximum security while leaving enough freedom for yourself, add the following line to the bottom of the '/etc/ssh/sshd_config' file:

StrictModes yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
KeepAlive yes

# Logging
SyslogFacility AUTH
LogLevel INFO

# Don't read ~/.rhosts and ~/.shosts files
IgnoreRhosts yes

#RhostsAuthentication
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no

# To disable tunneled clear text passwords
PasswordAuthentication no
PermitEmptyPasswords no

The above leaves only the 'Public Key Authentication' open. You may authenticate to the server only with your private key.

Note: drop your key in authorized_keys and try to login by doing "ssh -i key.file user@your.hostname.here". Once you have this working you can disable other authentication methods.

documented on: 2008-06-05, xpt