installation over ssh

Is there a way to install teamviewer over ssh? If you have a desktop environment it demands you to click the licence agreement so you need a graphical interface. Installing vnc to be able to install teamviewer remotely like we do know is a bit silly.