Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct installation method #67

Closed
graysky2 opened this issue Sep 29, 2020 · 6 comments
Closed

Correct installation method #67

graysky2 opened this issue Sep 29, 2020 · 6 comments

Comments

@graysky2
Copy link

graysky2 commented Sep 29, 2020

What is the correct method to package this without using pip3?
Manual installation? Where should policies go? Is tox.ini needed? Other files needed? Down the road, a Makefile would be nice or a setup script of some kind.

  install -Dm755 ssh-audit.py /usr/bin/ssh-audit
  install -Dm644 ssh-audit.1 /usr/share/man/man1/ssh-audit.1
  install -Dm644 LICENSE /usr/share/licenses/ssh-audit/LICENSE
@jtesta
Copy link
Owner

jtesta commented Sep 29, 2020

What is the correct method to package this without using pip3? Manual installation?

Yes, unfortunately there is no way to install the project locally in a clean manner at this time (I inherited maintenance from the original author, and I'm still working on it). This is being tracked in issue #46 (which may be dependent on #47). I'll be fixing these as soon as I can.

Where should policies go?

They should be in a folder named "policies" relative to where ssh-audit.py is. In other words, if you have /folder1/folder2/ssh-audit.py, then they should be in /folder1/folder2/policies/.

Once issue #46 is closed, there will probably be a better solution.

Is tox.ini needed?

Not for installation. That's used only for testing.

Other files needed?

Nope. Only ssh-audit.py and the contents of the policies/ directory are needed.

install -Dm755 ssh-audit.py /usr/bin/ssh-audit

This would require that the policies folder be in /usr/bin/policies/. Personally, I wouldn't be a fan of that. Instead, perhaps add a temporary Bash alias until #46 is resolved? This would work in the short term: alias ssh-audit="python3 /path/to/ssh-audit.py"

@jtesta jtesta closed this as completed Sep 29, 2020
@graysky2
Copy link
Author

graysky2 commented Sep 29, 2020

@jtesta - Thanks, Joe. I'll just package to /opt/ssh-audit/ for Arch Linux, see: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ssh-audit

EDIT: a wrapper is more generic than an alias, credit to reprograph, see: https://aur.archlinux.org/packages/ssh-audit/#comment-768022

@mpolanski
Copy link

In Alpine Linux I patched the code so the policy configurations reside in /usr/share/ssh-audit/policies: https://git.alpinelinux.org/aports/commit/?id=91a424eb0ea2098ac6e7a3de83c6c9d91622ef26

@graysky2
Copy link
Author

@mpolanski - Send a PR to @jtesta

@jtesta
Copy link
Owner

jtesta commented Sep 30, 2020 via email

@mpolanski
Copy link

@graysky2 My patch would break using policy files when ssh-audit is not system-wide installed, so I only patched it for Alpine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants