Homebridge WOL
信息
Homebridge WOL 可以将 PC 或者 NAS 等模拟成苹果家庭中的一个开关,控制其开关。
Wake up
提示
前提:打开 PC 或 NAS 系统和 bios 中的网络唤醒选项
找到 PC 或 NAS 的网卡的 mac 地址并填入即可,注意黑群的网卡的 mac 地址需填入真实的 mac 地址(bios 或者主板上可查)
Shutdown 命令
PC
- ssh 终端为 cmd 或 powershell
ssh -o StrictHostKeyChecking=no -i /root/.ssh/id_rsa user@ip shutdown /s /t 0
- ssh 终端为 bash(wsl)
ssh -o StrictHostKeyChecking=no -i /root/.ssh/id_rsa user@ip /mnt/c/Windows/System32/cmd.exe /c shutdown /s /t 0
提示
设置 Windows SSH 默认终端的方法
在 win10 的 cmd 或 powershell 中运行如下指令:
- 设置为powershell
- 设置为bash(wsl)
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -PropertyType String -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\bash.exe" -PropertyType String -Force
NAS
ssh -o StrictHostKeyChecking=no -i /homebridge/id_rsa root@ip shutdown -h now