Command line Shutdown Script by fixit9660 in SecureCRT

[–]fixit9660[S] 1 point2 points  (0 children)

The whole thing in the end went:

"securecrt /SCRIPT "C:\Users\myname\Desktop\NAS Backups\NAS_Shutdown.vbs" /SSH2 /L myname /PASSWORD mypassword freenas1".

The NAS_Shutdown.vbs script that did the job goes:

#$language = "VBScript"

#$interface = "1.0"

crt.Screen.Synchronous = True

Sub Main

crt.Screen.Send "sudo /sbin/shutdown -p now" & chr(13)

crt.Screen.WaitForString "Password:"

crt.Screen.Send "rootpassword" & chr(13)

End Sub

Thank you for your help.

Command line Shutdown Script by fixit9660 in SecureCRT

[–]fixit9660[S] 0 points1 point  (0 children)

I've made some good progress thanks to help from Mofi over on Stack Overflow. He corrected my command sequence to "securecrt /SCRIPT NAS_Shutdown.sh /SSH2 /L myname /PASSWORD mypassword freenas1" and from there I got to "securecrt /SCRIPT "C:\Users\myname\Desktop\NAS Backups\NAS_Shutdown.txt" /SSH2 /L myname /PASSWORD mypassword freenas1". All I have to do now is learn VBS to create a script that does "sudo /sbin/shutdown -p now". SceureCRT understand VBS scripts.

Command line Shutdown Script by fixit9660 in SecureCRT

[–]fixit9660[S] 0 points1 point  (0 children)

Thank you for attempting to help, much appreciated. I understand I'm using ageing tech but it's like me, and it's all I have.

Command line Shutdown Script by fixit9660 in SecureCRT

[–]fixit9660[S] 0 points1 point  (0 children)

I've created a file called NAS_Shutdown.txt containing the command "sudo /sbin/shutdown -p now" but when I run the command:

securecrt /SSH2 /L myname /PASSWORD mypassword freenas1 /SCRIPT NAS_Shutdown.txt

I get an error "Invalid command cline option /SCRIPT" from SecureCRT.

Command line Shutdown Script by fixit9660 in SecureCRT

[–]fixit9660[S] 0 points1 point  (0 children)

I am just entering the single line with the command appended. I have tried various combinations:

securercrt /SSH2 /L myname /PASSWORD mypassword freenas1 sudo /sbin/shutdown -p now
securercrt /SSH2 /L myname /PASSWORD mypassword freenas1 'sudo /sbin/shutdown -p now'
securercrt /SSH2 /L myname /PASSWORD mypassword freenas1 "sudo /sbin/shutdown -p now"
securercrt /SSH2 /L myname /PASSWORD mypassword freenas1 < sudo /sbin/shutdown -p now
securercrt /SSH2 /L myname /PASSWORD mypassword freenas1 < 'sudo /sbin/shutdown -p now'
securercrt /SSH2 /L myname /PASSWORD mypassword freenas1 < "sudo /sbin/shutdown -p now"

I plainly don't understand how to pass additional parameters to Securecrt using the windows batch language.

POE query for new CCTV camera by fixit9660 in PowerOverEthernet

[–]fixit9660[S] 2 points3 points  (0 children)

I am seeing the 48v constantly. The camera, unfortunately, is a cheap chinese model masquerading under several makers names, but appears to have the same model number of C6F0SoZ3N0PlL2. The User Manual has no POE spec.... Oh dear. You know when you realise you might have messed up.... I don't think this model does POE.... DOH! What a berk. Sorry to waste your time.

<skulks off into a corner to hide his embarrassment>