1. The configuration file sshd_config usually is located in /etc/ssh/ and only the root can modify it. If you have installed from source, this configuration file may be located in a different directory.
2. Make a backup of the current sshd_config file first. Login as root and open a new file and add the following lines
# rhosts authentication should not be used #RhostsAuthentication no # Don't read the user's ~/.rhosts and ~/.shosts files #IgnoreRhosts yes # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts #RhostsRSAAuthentication no # similar for protocol version 2 #HostbasedAuthentication no # Change to yes if you don't trust ~/.ssh/known_hosts for # RhostsRSAAuthentication and HostbasedAuthentication #IgnoreUserKnownHosts no # To disable tunneled clear text passwords, change to no here! #PasswordAuthentication yes #PermitEmptyPasswords no # Change to no to disable s/key passwords #ChallengeResponseAuthentication yes # Kerberos options #KerberosAuthentication no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes #AFSTokenPassing no # Kerberos TGT Passing only works with the AFS kaserver #KerberosTgtPassing no # Set this to 'yes' to enable PAM keyboard-interactive authentication # Warning: enabling this may bypass the setting of 'PasswordAuthentication' #PAMAuthenticationViaKbdInt yes #Allow X display forwarding X11Forwarding yes #X11DisplayOffset 10 #X11UseLocalhost yes #PrintMotd yes #PrintLastLog yes #KeepAlive yes #UseLogin no UsePrivilegeSeparation yes #Compression yes #MaxStartups 10 # no default banner path #Banner /some/path #VerifyReverseMapping no # override default of no subsystems Subsystem sftp /usr/lib/ssh/sftp-server #Do not allow root login PermitRootLogin no
Save this file over your current sshd_config file in the /etc/ssh directory.
Note
This configuration
* does not allow remote root login for security reasons.
* allows X display forwarding (remote X display). To disable the feature, comment out the line X11Forwarding yes or change it to X11Forwarding no.
* allows incoming sftp (secure FTP) connections.

Sign In
Register
Help
MultiQuote