there's another way which only influences users using ssh not local ones (which might be better in emergency situations)
see the snippets from the ssh man page below.
in this case the users can usually modify the files themselves (a bit like .bashrc)
~/.ssh/rc
Commands in this file are executed by ssh when the user logs in, just before the user's shell (or command) is started. See the sshd(8) manual page for more information.
and this is global and not modifiable by the normal user
/etc/sshrc
Commands in this file are executed by ssh when the user logs in, just before the user's shell (or command) is started. See the sshd(8) manual page for more information.
HTH
Marcel