# Shutdown (sleep on lan) computer via SSH using SSH client app

**URL:** https://community.homey.app/t/shutdown-sleep-on-lan-computer-via-ssh-using-ssh-client-app/42334
**Category:** Flows
**Created:** [February 3, 2021, 9:38am UTC](https://community.homey.app/t/shutdown-sleep-on-lan-computer-via-ssh-using-ssh-client-app/42334 "2021-02-03T09:38:28Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![G-balizer](https://avatars.discourse-cdn.com/v4/letter/g/e0b2c6/32.png) [@G-balizer](https://community.homey.app/u/G-balizer)
#### Post date: [February 3, 2021, 9:38am UTC](https://community.homey.app/t/shutdown-sleep-on-lan-computer-via-ssh-using-ssh-client-app/42334/1 "2021-02-03T09:38:28Z")

</div>

Don’t know if this was already discussed before but I have a nice flow that shutdowns my computer when I leave the house.

Here goes:  
If you have enabled ssh in your OS you can use the SSH client app to shutdown Windows for example.

1. You have to add your computer as a new SSH server by clicking SSH client (yes that’s confusing)
2. Once you’ve established the connection the only thing left to do is to create a flow that sends this command:

"shutdown -s -t 60 -f -c “Apparently you are not at home, computer will shutdown in 60 seconds”

I use it with a delay, so I have one minute to cancel the shutdown (a flow with command shutdown /a) if by some accident Homey thinks I left the house.

Hopefully this is useful for some of you.

---

<div class="post-metadata">

### Author: ![Shakesbeard](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/shakesbeard/32/15112_2.png) [@Shakesbeard](https://community.homey.app/u/Shakesbeard)
#### Post date: [February 6, 2021, 8:57pm UTC](https://community.homey.app/t/shutdown-sleep-on-lan-computer-via-ssh-using-ssh-client-app/42334/2 "2021-02-06T20:57:43Z")

</div>

Did similar but with webhooks 🙂
