From 8cf3e34cff73c47b905eb5daf1df6ceba8759542 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Thu, 3 Mar 2016 08:51:05 +0200 Subject: [PATCH] - In Debian the sshd executable is in /usr/sbin/sshd which is not in the normal users PATH, adjusted test target accordingly. - The clean target will also kill the running sshd instance if the sshd.pid file is present. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 747e38d..9d3bfb0 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ install: chmod 755 /usr/local/bin/ssh-ca clean: + if [ -f sshd.pid ] && [ -d "/proc/$$(cat sshd.pid)" ]; then kill "$$(cat sshd.pid)"; fi rm -rf CA CA.pub users hosts known_hosts sshd.pid sshd_config test: clean sshd_config @@ -21,6 +22,6 @@ test: clean sshd_config ./ssh-ca newuser $$USER ./ssh-ca newhost localhost echo "@cert-authority * $$(cat CA.pub)" > known_hosts - $$(which sshd) -f sshd_config + $$(PATH=$$PATH:/usr/local/sbin:/usr/sbin:/sbin which sshd) -f sshd_config test "$$(ssh -F ssh_config test whoami)" = "$$USER" kill $$(cat sshd.pid) -- GitLab