Skip to content

Instantly share code, notes, and snippets.

@brandocorp
Created October 24, 2016 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brandocorp/197e42d10cc52f062c428bc1d5407ded to your computer and use it in GitHub Desktop.
Save brandocorp/197e42d10cc52f062c428bc1d5407ded to your computer and use it in GitHub Desktop.
SSH Apparmor
usr.sbin.sshd
# Last Modified: Mon Oct 24 22:15:48 2016
#include <tunables/global>
/usr/sbin/sshd flags=(complain) {
#include <abstractions/base>
#include <abstractions/consoles>
#include <abstractions/nameservice>
#include <abstractions/openssl>
capability setgid,
capability sys_resource,
/etc/ssh/ssh_host_dsa_key r,
/etc/ssh/ssh_host_dsa_key.pub r,
/etc/ssh/ssh_host_ecdsa_key r,
/etc/ssh/ssh_host_ecdsa_key.pub r,
/etc/ssh/ssh_host_ed25519_key r,
/etc/ssh/ssh_host_ed25519_key.pub r,
/etc/ssh/ssh_host_rsa_key r,
/etc/ssh/ssh_host_rsa_key.pub r,
/etc/ssh/sshd_config r,
/proc/*/fd/ r,
/proc/*/oom_score_adj rw,
/run/sshd.pid w,
/usr/sbin/sshd mr,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment