fix: update ssh.socket to listen on port 22333

Newer versions of sshd respect the systemd settings for listening on ports vs just the sshd_config.
This commit is contained in:
Jose Diaz-Gonzalez
2024-09-22 20:04:32 -04:00
parent 46c1e80c19
commit 5bb4de58d7

View File

@@ -86,7 +86,12 @@ ifneq ($(wildcard /etc/ssh/sshd_config),)
ifeq ($(shell grep 22333 /etc/ssh/sshd_config),)
sed --in-place "s:^Port 22:Port 22 \\nPort 22333:g" /etc/ssh/sshd_config
endif
ifeq ($(shell grep 22333 /usr/lib/systemd/system/ssh.socket),)
sed --in-place "s:^ListenStream=22:ListenStream=22 \\nListenStream=22333:g" /usr/lib/systemd/system/ssh.socket
endif
cat /usr/lib/systemd/system/ssh.socket
cat /etc/ssh/sshd_config
systemctl daemon-reload
service ssh restart
service ssh status
journalctl -u ssh -f -n 1000