SSH PI=>Rig shutdown

Hey,

did anyone have a step by step tutorial for an SSH connection?
I tryed very much an read some topics in different communitys but everytime it is not working. I still want to shutdown the Rig at different states at the Pi.
The messages are different sometimes not the correct rights,…
Or did anyone have a better idea for a shutdown as SSH?