Yes. You can have a command in .ssh/authorized_keys that is directly invoked whenever a login with that key happens. In fact this is a common practice on headless machines to have a simple means to reboot them by operators who shall not get a login shell.Can there be an ssh configuration, which may reboot the machine due to some configuration?
BTW, there should be some data in /var/log/auth.log about who is logging in from where via ssh.