how to send a comand from windows machine to shutdown server truenas scale ?

gus4b

Dabbler
Joined
May 23, 2023
Messages
22
hello If someone can help me out, im tring to automate daily routines, how can i create a .bat file in wondows 10 to send a shutdown comand to my truenas scale ?

thanks,

best,
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
A powershell script can do that. With SSH client builtin to Windows 10 and 11 you can do something like ssh root@1.2.3.4 shutdown -P now. Look into Windows SSH client and public/private key authentication.
 

gus4b

Dabbler
Joined
May 23, 2023
Messages
22
A powershell script can do that. With SSH client builtin to Windows 10 and 11 you can do something like ssh root@1.2.3.4 shutdown -P now. Look into Windows SSH client and public/private key authentication.
thanks for the advice, i tried to connect with the comand: ssh "user name"@"ip adress" and gave the following response ssh connect to host "ip adress" connection refused and in the second ip adress connection timed out...
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You need to enable the SSH service, configure it to permit root login, generate a private/public key pair and put the public key into the root user on TrueNAS keeping the private key on your Windows system.

When I wrote "look into" I meant you will have some reading to do. I don't use Windows, so ...
 
Top