I would like to run two sshd daemons on debian 8 (using openssh), one for administration and one for sftp.
This used to be quite easy in debian 7 but with systemd it is more difficult.
So far I have created the sshd_config_second
and the ssh_config_second
.
How would I create a service file for sshd_second.service
and start the daemon?
I looked into the sshd.service but this does not reference the sshd_config
file. Where do I feed the daemon these config files?
Update:
I followed this from RHEL7 and was successful:
Best Answer
The default Debian 8 systemd sshd unit is in
/lib/systemd/system/ssh.service
and is pretty simple. All you would need to do is something likecp /lib/systemd/system/ssh.service /etc/systemd/system/ssh_sftp.service
then edit your file to be something like this.After creating that file, enable and start it.
systemctl enable ssh_sftp.service
andsystemctl start ssh_sftp.service
.Like @Michael Hampton suggested, basically the exact same set of instructions as what was suggested for the Redhat.