Skip to content
Snippets Groups Projects
Commit 8cf3e34c authored by nimrod's avatar nimrod
Browse files

- 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.
parent ff3ffc19
Branches
No related tags found
No related merge requests found
...@@ -14,6 +14,7 @@ install: ...@@ -14,6 +14,7 @@ install:
chmod 755 /usr/local/bin/ssh-ca chmod 755 /usr/local/bin/ssh-ca
clean: 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 rm -rf CA CA.pub users hosts known_hosts sshd.pid sshd_config
test: clean sshd_config test: clean sshd_config
...@@ -21,6 +22,6 @@ test: clean sshd_config ...@@ -21,6 +22,6 @@ test: clean sshd_config
./ssh-ca newuser $$USER ./ssh-ca newuser $$USER
./ssh-ca newhost localhost ./ssh-ca newhost localhost
echo "@cert-authority * $$(cat CA.pub)" > known_hosts 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" test "$$(ssh -F ssh_config test whoami)" = "$$USER"
kill $$(cat sshd.pid) kill $$(cat sshd.pid)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment