protected function getHostPort($host, $default = 22) { $hostInfo = explode(':', $host); return !empty($hostInfo[1]) ? $hostInfo[1] : $default; }