I need to disable the kernel system request debugging on an Ubuntu computer, but have not been able to find a way of how to do this.
It is not foolproof, but the easiest way is to add
kernel.sysrq = 0
/etc/sysctl.conf (or perhaps
/etc/sysctl.d/99-sysctl.conf or similar). That leaves a short window while the machine is booting, where the key might be available, but it is disabled once the file is processed by the kernel.
If you build your own kernels, then building one without sysrq is the recommended way of making sure it is never enabled.
See e.g. this page.