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:
1 file changed
+5
@@ -86,7 +86,12 @@ ifneq ($(wildcard /etc/ssh/sshd_config),)
|
|||||||
ifeq ($(shell grep 22333 /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
|
sed --in-place "s:^Port 22:Port 22 \\nPort 22333:g" /etc/ssh/sshd_config
|
||||||
endif
|
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
|
cat /etc/ssh/sshd_config
|
||||||
|
systemctl daemon-reload
|
||||||
service ssh restart
|
service ssh restart
|
||||||
service ssh status
|
service ssh status
|
||||||
journalctl -u ssh -f -n 1000
|
journalctl -u ssh -f -n 1000
|
||||||
|
|||||||
Reference in new issue
Block a user