Deactivate xscreensaver via SSH
xscreensaver-command -deactivateIf you happen to use gnome-screensaver (default in Ubuntu), the following command might help (not tested):
DISPLAY=:0 gnome-screensaver-command -pThanks to YaronSh on the Ubuntu forums.