Exemplo n.º 1
0
 /**
  * Get the SSH configuration file instance.
  *
  * @param  string  $user
  * @return \Laravel\Envoy\SSHConfigFile
  */
 protected function getSshConfig($user)
 {
     if (file_exists($path = $this->getHomeDirectory($user) . '/.ssh/config')) {
         return SSHConfigFile::parse($path);
     }
 }
Exemplo n.º 2
0
 private function parse($config)
 {
     $sshConfig = SSHConfigFile::parseString($config);
     $r = new \ReflectionObject($sshConfig);
     $property = $r->getProperty('groups');
     $property->setAccessible(true);
     return $property->getValue($sshConfig);
 }