"echo 3 > /proc/sys/vm/drop_caches" - Permission denied as root
sudo
has to cover whole the redirection so it can be completely executed by root:
$ sudo sh -c "/usr/bin/echo 3 > /proc/sys/vm/drop_caches"
I am logged in as root over SSH...It is a remote machine running Debian.
Is it actually a remote machine, or a just a remote system? If this is a VPS slice somewhere, (at least some forms of) OS virtualization (e.g. openVZ) won't permit this from within the container. You don't run the machine, you just run your slice.
This is normal behavior under OS-level virtualization. This can only be executed by someone with root access to the hardware node.
With for example OpenVZ, you don't get your own kernel instance and as such, are restricted from performing commands like this.
All share the same page cache, so to drop caches of only your instance, the kernel must check if the page belongs to you and if the other instances aren't using this page too.
With another virtualization technique like KVM or Xen this might be working.