Password less logins – Remote shutdown

To follow on directly from my previous post I have since dicovered some really useful applictions to this

1. remote shutdown, (sort of)

if you want to shutdown normally via ssh you need to

ssh pi@ip-of-pi
then type
sudo shutdown -h now

you can combibe the above in one command

ssh pi@ip-of-pi sudo shutdown -h now

you only then need to enter the root password for sudo. (rther than the password to login then another (or the same) for sudo.

replace shutdown -h now with reboot to reboot the pi.