Difference between revisions of "/etc/systemd/system/sshd.service"

From wikieduonline
Jump to navigation Jump to search
 
(5 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
  After=network.target auditd.service
 
  After=network.target auditd.service
 
  ConditionPathExists=!/etc/ssh/sshd_not_to_be_run
 
  ConditionPathExists=!/etc/ssh/sshd_not_to_be_run
 
+
 
  [Service]
 
  [Service]
 
  EnvironmentFile=-/etc/default/ssh
 
  EnvironmentFile=-/etc/default/ssh
 
  ExecStartPre=/usr/sbin/sshd -t
 
  ExecStartPre=/usr/sbin/sshd -t
  '''ExecStart'''=/usr/sbin/sshd -D $SSHD_OPTS
+
  '''[[ExecStart]]'''=/usr/sbin/sshd -D $SSHD_OPTS
 
  ExecReload=/usr/sbin/sshd -t
 
  ExecReload=/usr/sbin/sshd -t
 
  ExecReload=/bin/kill -HUP $MAINPID
 
  ExecReload=/bin/kill -HUP $MAINPID
Line 18: Line 18:
 
  RuntimeDirectory=sshd
 
  RuntimeDirectory=sshd
 
  RuntimeDirectoryMode=0755
 
  RuntimeDirectoryMode=0755
 
+
 
  [Install]
 
  [Install]
 
  WantedBy=multi-user.target
 
  WantedBy=multi-user.target
Line 25: Line 25:
 
== Related terms ==
 
== Related terms ==
 
* <code>[[/etc/systemd/]]system/</code>
 
* <code>[[/etc/systemd/]]system/</code>
 
+
* <code>[[apt install openssh-server]]</code>
  
 
== See also ==
 
== See also ==
 +
* {{OpenSSH}}
 
* {{systemctl}}
 
* {{systemctl}}
 +
 +
[[Category:Linux]]

Latest revision as of 09:41, 13 December 2023

[Unit]
Description=OpenBSD Secure Shell server
Documentation=man:sshd(8) man:sshd_config(5)
After=network.target auditd.service
ConditionPathExists=!/etc/ssh/sshd_not_to_be_run

[Service]
EnvironmentFile=-/etc/default/ssh
ExecStartPre=/usr/sbin/sshd -t
ExecStart=/usr/sbin/sshd -D $SSHD_OPTS
ExecReload=/usr/sbin/sshd -t
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartPreventExitStatus=255
Type=notify
RuntimeDirectory=sshd
RuntimeDirectoryMode=0755

[Install]
WantedBy=multi-user.target
Alias=sshd.service

Related terms[edit]

See also[edit]

Advertising: