mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
Add example systemd unit for sshd in Diffusion docs
Summary: The docs don't specify how to make the second sshd daemon start on every reboot. I've added a unit that I use in my setup to the docs. Ref T15467 Test Plan: Check that the docs look alright. Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15467 Differential Revision: https://we.phorge.it/D25497
This commit is contained in:
parent
be763d90ce
commit
bd44ec833f
1 changed files with 26 additions and 0 deletions
|
@ -585,6 +585,32 @@ Very carefully, restart `sshd`. Verify that you can connect on the new port:
|
|||
Now you can move the Phorge `sshd` to port 22, then adjust the value
|
||||
for `diffusion.ssh-port` in your Phorge configuration.
|
||||
|
||||
You can set up and enable this systemd unit to start the second sshd
|
||||
daemon on every reboot:
|
||||
|
||||
```
|
||||
name=/etc/systemd/system/phorge-ssh.service,lang=ini
|
||||
[Unit]
|
||||
Description=Phorge sshd
|
||||
Documentation=https://we.phorge.it/book/phorge/article/diffusion_hosting/#sshd-setup
|
||||
After=network.target auditd.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/usr/sbin/sshd -t -f /path/to/config_file.edited
|
||||
ExecStart=/usr/sbin/sshd -f /path/to/config_file.edited
|
||||
ExecReload=/usr/sbin/sshd -t -f /path/to/config_file.edited
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
RestartPreventExitStatus=255
|
||||
Type=notify
|
||||
RuntimeDirectory=sshd
|
||||
RuntimeDirectoryMode=0755
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=phorge-sshd.service
|
||||
```
|
||||
|
||||
No Direct Pushes
|
||||
================
|
||||
|
|
Loading…
Reference in a new issue