Print commands trough ssh (stop print)

Hello all.

I am running octoprint on a raspberry pi 3.
And whas wondering if it is possible to stop a print trough ssh and then home the printer?

I searched google and the forum but cant find this.

One could do it from the command line, having remote'd into the Pi.