lib/base/BaseDeploy.class.php
protected function sshExec($remote_host, $command, &$output, &$return, $hide_pattern = '', $hide_replacement = '', $ouput_loglevel = LOG_INFO)
	{
		$cmd = $this->ssh_path .' -p '. $this->remote_port .' '. $this->remote_user .'@'. $remote_host .' "'. str_replace('"', '\"', $command) .'"';

		if ($hide_pattern != '') {
			$show_cmd = preg_replace($hide_pattern, $hide_replacement, $cmd);
		} else {
			$show_cmd = $cmd;
		}

		$this->log('sshExec: '. $show_cmd, $ouput_loglevel);

		exec($cmd, $output, $return);
	}
protected function sshExec($remote_host, $command, &$output, &$return, $hide_pattern = '', $hide_replacement = '', $ouput_loglevel = LOG_INFO)
	{
		$cmd = $this->ssh_path .' -p '. $this->remote_port .' '. $this->remote_user .'@'. $remote_host .' "'. str_replace('"', '\"', $command) .'"';

		if ($hide_pattern != '') {
			$show_cmd = preg_replace($hide_pattern, $hide_replacement, $cmd);
		} else {
			$show_cmd = $cmd;
		}

		$this->log('sshExec: '. $show_cmd, $ouput_loglevel);

		exec($cmd, $output, $return);
	}
protected function sshExec ( $ remote_host , $ command , & $ output , & $ return , $ hide_pattern = '' , $ hide_replacement = '' , $ ouput_loglevel = LOG_INFO ) { $ cmd = $ this -> ssh_path . ' -p ' . $ this -> remote_port . ' ' . $ this -> remote_user . '@' . $ remote_host . ' "' . str_replace ( '"' , '\"' , $ command ) . '"' ; if ( $ hide_pattern != '' ) { $ show_cmd = preg_replace ( $ hide_pattern , $ hide_replacement , $ cmd ) ; } else { $ show_cmd = $ cmd ; } $ this -> log ( 'sshExec: ' . $ show_cmd , $ ouput_loglevel ) ; exec ( $ cmd , $ output , $ return ) ; }
Wrapper for SSH command's

@param string $remote_host
@param string $command
@param array $output
@param int $return
@param string $hide_pattern		Regexp to clean up output (eg. passwords)
@param string $hide_replacement
@param int $ouput_loglevel
Wrapper for SSH command s