This is you secure your VPS partitions in ssh
Is it a Dedicated server OR a VPS? If it’s a Dedicated server, edit the /etc/fstab file
vi /etc/fstab
replace “defaults” in front of /tmp, /dev/shm to
nosuid,noexec,rw
Save the file and remount the partitions:
mount -o remount /tmp
mount -o remount /dev/shm
To secure /var/tmp, rename the existing /var/tmp and create a symlink
mv /var/tmp /var/tmp_bak
ln -s /tmp /var/tmp
Hope this helps