A few comments:
- the cron example listed doesn't run "every few minues" as mentioned, but every minute
-17 is not a valid value for oom_adj. It goes from -16 to 15.
- the proper way to set this assuming the host uses systemd is via the unit configuration:
[Service]
OOMScoreAdjust = -1000
- if using systemd, you would then also need to configure ssh to always run rather than be socket activated (the default depends on your distribution)
A few comments:
-17is not a valid value foroom_adj. It goes from -16 to 15.