Automate Shutdown process /w Shell Cmd

I was wondering if there’s a way to power off the RPi 2 remotely. I’m on linux, i want to create an automate task using the shell cmd in order to shutdown the Rpi 2 with just a click, any of you knows how to do that? What’s the method to bypass the Password prompt when SSHing into the Pi just before entering the Command to shut it down? May i be able to run this command creating a .sh file that will stay on my desktop?

Thanks in advice!

there are a couple of ways to do it:

The first one is the least secure but also probably the easiest.

Thanks! I will give it a try