Changeset 856 for trunk/Modules/NetworkConfigAirOS/Generators/SSHClient.php
- Timestamp:
- Aug 14, 2018, 5:05:00 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkConfigAirOS/Generators/SSHClient.php
r753 r856 17 17 $this->Password = $Password; 18 18 $this->Debug = false; 19 $this->PrivateKey = ' id_dsa';19 $this->PrivateKey = '~/.ssh/id_rsa'; 20 20 $this->SSHPath = '/usr/bin/ssh'; 21 21 $this->Timeout = 3; … … 30 30 $Commands = str_replace('$', '\$', $Commands); 31 31 //$Commands = str_replace(' ', '\ ', $Commands); 32 $Command = $this->SSHPath.' -o ConnectTimeout='.$this->Timeout.' -l '. 33 $this->UserName.' -i '.$this->PrivateKey.' '.$this->HostName.' "'.$Commands.'"'; 32 if ($this->PrivateKey != '') $PrivKey = ' -i '.$this->PrivateKey; 33 else $PrivKey = ''; 34 $Command = $this->SSHPath.' -oBatchMode=yes -o ConnectTimeout='.$this->Timeout.' -l '. 35 $this->UserName.$PrivKey.' '.$this->HostName.' "'.$Commands.'"'; 34 36 if($this->Debug) echo($Command); 35 37 $Output = array();
Note:
See TracChangeset
for help on using the changeset viewer.