I would like to know what are the ways to automatically start daemons (sshd) in Fedora system. I know I can write a startup script that will put on /etc/init.d/.What are the other options?Somewhere I read that now in the new version of this can be done using the commands in the terminal, but I do not remember what it was.My 2 question. I install ssh from source. When keys are generated for a server? During the installation?
Fedora how to automatically run the ssh daemon - install from source
fedora
In Fedora 20, there's a directory /etc/systemd/system/multi-user.target.wantsI didn't compile from source.  Unless I'm mistaken these are the files/links which enable the commands below.  The file is a link tosshd.service -> /usr/lib/systemd/system/sshd.serviceHere's an example of the default sshd file.[Unit]Description=OpenSSH server daemonAfter=syslog.target network.target auditd.service[Service]EnvironmentFile=/etc/sysconfig/sshdExecStartPre=/usr/sbin/sshd-keygenExecStart=/usr/sbin/sshd -D $OPTIONSExecReload=/bin/kill -HUP $MAINPIDKillMode=processRestart=on-failureRestartSec=42s[Install]WantedBy=multi-user.targetIf you have the symbolic link in the location above, pointing to a file that contains the configuration above you'll be able to use the systemctl commands below.Assuming you're using a version of Fedora 15 or later... systemctl start sshdsystemctl enable sshdThe first command will start, the second command will enable auto-starting at boot.systemctl restart sshd Will restart the service.Also see systemctl status sshdThe same series of systemctl commands work for various services.  To see a list of running services... systemctl list-units --type service