Changeset 888 for trunk/Modules/NetworkConfigAirOS/Generators/SSHClient.php
- Timestamp:
- Nov 24, 2020, 10:58:56 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkConfigAirOS/Generators/SSHClient.php
r874 r888 3 3 class SSHClient 4 4 { 5 var$SSHPath;6 var$Timeout;7 var$HostName;8 var$UserName;9 var$Password;10 var$PrivateKey;11 var$Debug;5 public string $SSHPath; 6 public int $Timeout; 7 public string $HostName; 8 public string $UserName; 9 public string $Password; 10 public string $PrivateKey; 11 public bool $Debug; 12 12 13 13 function __construct($HostName = 'localhost', $UserName = 'admin', $Password = '') … … 22 22 } 23 23 24 function Execute( $Commands)24 function Execute(string $Commands): array 25 25 { 26 26 $Commands = trim($Commands); … … 37 37 $Output = array(); 38 38 exec($Command, $Output); 39 } else $Output = '';39 } else $Output = array(); 40 40 if ($this->Debug) print_r($Output); 41 41 return $Output;
Note:
See TracChangeset
for help on using the changeset viewer.