Skip to main content
Post Undeleted by sonnik
added 799 characters in body
Source Link
sonnik
  • 156
  • 3

In Fedora 20, there's a directory

/etc/systemd/system/multi-user.target.wants

I didn't compile from source. Unless I'm mistaken these are the files/links which enable the commands below.

The file is a link to

sshd.service -> /usr/lib/systemd/system/sshd.service

Here's an example of the default sshd file.

[Unit]
Description=OpenSSH server daemon
After=syslog.target network.target auditd.service

[Service]
EnvironmentFile=/etc/sysconfig/sshd
ExecStartPre=/usr/sbin/sshd-keygen
ExecStart=/usr/sbin/sshd -D $OPTIONS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target

If 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 sshd
systemctl enable sshd

The first command will start, the second command will enable auto-starting at boot.

systemctl restart sshd 

Will restart the service.

Also see

systemctl status sshd

The same series of systemctl commands work for various services. To see a list of running services...

systemctl list-units --type service

Assuming you're using a version of Fedora 15 or later...

systemctl start sshd
systemctl enable sshd

The first command will start, the second command will enable auto-starting at boot.

Also see

systemctl status sshd

The same series of systemctl commands work for various services. To see a list of running services...

systemctl list-units --type service

In Fedora 20, there's a directory

/etc/systemd/system/multi-user.target.wants

I didn't compile from source. Unless I'm mistaken these are the files/links which enable the commands below.

The file is a link to

sshd.service -> /usr/lib/systemd/system/sshd.service

Here's an example of the default sshd file.

[Unit]
Description=OpenSSH server daemon
After=syslog.target network.target auditd.service

[Service]
EnvironmentFile=/etc/sysconfig/sshd
ExecStartPre=/usr/sbin/sshd-keygen
ExecStart=/usr/sbin/sshd -D $OPTIONS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target

If 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 sshd
systemctl enable sshd

The first command will start, the second command will enable auto-starting at boot.

systemctl restart sshd 

Will restart the service.

Also see

systemctl status sshd

The same series of systemctl commands work for various services. To see a list of running services...

systemctl list-units --type service
Post Deleted by sonnik
Source Link
sonnik
  • 156
  • 3

Assuming you're using a version of Fedora 15 or later...

systemctl start sshd
systemctl enable sshd

The first command will start, the second command will enable auto-starting at boot.

Also see

systemctl status sshd

The same series of systemctl commands work for various services. To see a list of running services...

systemctl list-units --type service