protected function checkSSHConnection($server = null, $ssh_config_file = null, $verbose = false)
    {
        $server = $server ? $server : $this->hostNameForConfigFile();
        $ssh_config_file =  $ssh_config_file ? $ssh_config_file : $this->sshConfigFile();
        if ($verbose) {
            $this->info("timeout 10 ssh -F $ssh_config_file -q " . $server . ' exit; echo $?');
        }

        $ret = exec("timeout 10 ssh -F $ssh_config_file -q " . $server . ' "exit"; echo $?');
        if ($ret == 0) {
            return true;
        }
        return false;
    }
protected function checkSSHConnection($server = null, $ssh_config_file = null, $verbose = false)
    {
        $server = $server ? $server : $this->hostNameForConfigFile();
        $ssh_config_file =  $ssh_config_file ? $ssh_config_file : $this->sshConfigFile();
        if ($verbose) {
            $this->info("timeout 10 ssh -F $ssh_config_file -q " . $server . ' exit; echo $?');
        }

        $ret = exec("timeout 10 ssh -F $ssh_config_file -q " . $server . ' "exit"; echo $?');
        if ($ret == 0) {
            return true;
        }
        return false;
    }
protected function checkSSHConnection ( $ server = null , $ ssh_config_file = null , $ verbose = false ) { $ server = $ server ? $ server : $ this -> hostNameForConfigFile ( ) ; $ ssh_config_file = $ ssh_config_file ? $ ssh_config_file : $ this -> sshConfigFile ( ) ; if ( $ verbose ) { $ this -> info ( "timeout 10 ssh -F $ssh_config_file -q " . $ server . ' exit; echo $?' ) ; } $ ret = exec ( "timeout 10 ssh -F $ssh_config_file -q " . $ server . ' "exit"; echo $?' ) ; if ( $ ret == 0 ) { return true ; } return false ; }
Check SSH connection.

@return bool
Check SSH connection .