fix: only uncomment port for sshd-config
This commit is contained in:
4
tests.mk
4
tests.mk
@@ -69,11 +69,11 @@ else ifeq ($(shell grep dokku.me /root/.ssh/config),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(wildcard /etc/ssh/sshd_config),)
|
ifneq ($(wildcard /etc/ssh/sshd_config),)
|
||||||
|
sed --in-place "s/^#Port 22$\/Port 22/g" /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
|
||||||
sed --in-place "s:^#Port 22$:Port 22 \\nPort 22333:g" /etc/ssh/sshd_config
|
|
||||||
service ssh restart
|
|
||||||
endif
|
endif
|
||||||
|
service ssh restart
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@echo "-----> Installing SSH public key..."
|
@echo "-----> Installing SSH public key..."
|
||||||
|
|||||||
Reference in New Issue
Block a user