

After: This service will be started after network.target is active during boot up time.User: Provide the username of your non-root user.So the SSHD daemon will be started using our configuration file and log path. We have defined a custom configuration file with -f /opt/ssh/sshd_config and a log file path using -E /tmp/sshd.log. ExecStart: section contains the command to be executed to start the SSHD daemon.We have created a new service unit file /etc/systemd/system/rvice with the following content: cat /etc/systemd/system/rviceĮxecStart=/usr/sbin/sshd -D -f /opt/ssh/sshd_config -E /tmp/sshd.log Next we will create our systemd service to monitor and manage the SSHD daemon. Step-3: Configure SSHD as systemd service If you get an output, it would mean that this parameter is supported and you can set this param as no inside /opt/ssh/sshd_config. To check this, execute # sshd -T | grep -i UsePrivilegeSeparation This depends on the fact that this parameter is still supported by SSHD. In some Linux distribution you may also need to add UsePrivilegeSeparation no. Why SSHD service fails to start as normal user?īefore we go ahead, let us first understand the problems which we must address to configure SSHD as non-root user in Linux. Now these Pods would be running as non-privileged so we wanted to use SSHD as normal user without any additional privilege or capabilities. Recently we had a requirement to use SSHD inside a container of Kubernetes Pod. In this tutorial I will share the steps to run SSHD as non-root (normal) user in Linux platform. Restrictions or Problems using SSHD as non-root user.

Step-5: Verify SSHD process is started as non-root user.Step-3: Commit docker container changes.Step-2: Install and Configure supervisord.Configure SSHD as non-root user on containers with Kubernetes.Step-5: Start SSHD Service (without sudo).Step-3: Configure SSHD as systemd service.Step-2: Configure SSHD as non-root user.Configure SSHD as normal user on Linux Server.Why SSHD service fails to start as normal user?.
