From 981e857ab162dab9164cb3d2169dcc473cf140f5 Mon Sep 17 00:00:00 2001 From: Michael Hobbs Date: Sat, 25 Apr 2015 09:54:49 -0700 Subject: [PATCH] add sshd config for off-port testing --- tests.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests.mk b/tests.mk index c4d126bbb..68f3e32fc 100644 --- a/tests.mk +++ b/tests.mk @@ -28,8 +28,15 @@ endif @echo "-----> Setting up ssh config..." ifneq ($(shell ls /root/.ssh/config > /dev/null 2>&1 ; echo $$?),0) echo "Host dokku.me \\r\\n RequestTTY yes \\r\\n IdentityFile /root/.ssh/dokku_test_rsa" >> /root/.ssh/config + echo "Host 127.0.0.1 \\r\\n Port 22333 \\r\\n RequestTTY yes \\r\\n IdentityFile /root/.ssh/dokku_test_rsa" >> /root/.ssh/config else ifeq ($(shell grep dokku.me /root/.ssh/config),) echo "Host dokku.me \\r\\n RequestTTY yes \\r\\n IdentityFile /root/.ssh/dokku_test_rsa" >> /root/.ssh/config + echo "Host 127.0.0.1 \\r\\n Port 22333 \\r\\n RequestTTY yes \\r\\n IdentityFile /root/.ssh/dokku_test_rsa" >> /root/.ssh/config +endif + +ifeq ($(shell grep 22333 /etc/ssh/sshd_config),) + sed --in-place "s:^Port 22:Port 22 \\nPort 22333:g" /etc/ssh/sshd_config + restart ssh endif @echo "-----> Installing SSH public key..." @@ -38,6 +45,7 @@ endif @echo "-----> Intitial SSH connection to populate known_hosts..." ssh -o StrictHostKeyChecking=no dokku@dokku.me help > /dev/null + ssh -o StrictHostKeyChecking=no dokku@127.0.0.1 help > /dev/null ifeq ($(shell grep dokku.me /home/dokku/VHOST 2>/dev/null),) @echo "-----> Setting default VHOST to dokku.me..."