Next Topic

Previous Topic

Book Contents

Sample Script: TLuaSSH2Client

SSHClient = TLuaSSH2Client(); 
SSHClient:Open(23,"testuser","testpassword");
if SSHClient:ExecuteCommand("shutdown") == true then 	print(SSHClient:GetStdOut()); 
	SetExitStatus("Exec ok",true);
else
	print(SSHClient:GetStdErr()); 
	print(SSHClient:GetErrorDescription()); 	
	SetExitStatus("Exec failed",true);
end