How to configure SSHD on Xinetd

Printer-friendly version

This is small tutorial on how to configure OpenSSH daemon on Xinetd.

This is useful if your users don't login too frequently over SSH, hence it wastes memory and CPU just by running in the background.

Note that SSHD needs to generate the server key before it reponds which can take long time depending on your key size. For small keysizes, it works well.

To change the port, you need to edit /etc/services. I will not be covering that here as that job is too easy to do (you can always request a tutorial if you want).

Here's how to setup Xinetd configuration file for SSHD:

service ssh
{
    
    socket_type = stream
    protocol = tcp
    instances = 3 # Keep this high if there's a possibility of multiple users logging at the same time.
    wait = no
    user = root
    server = /usr/sbin/sshd
    server_args = -i # Tell sshd that it is being run by xinetd
    port = 22 # Edit /etc/services to change this

}


Nilesh Govindrajan

Site & Server Administrator
iTech7

Syndicate content