Deployment\SshServer::connect PHP Method

connect() public method

Connects to FTP server.
public connect ( ) : void
return void
    public function connect()
    {
        $this->connection = $this->protect('ssh2_connect', [$this->url['host'], empty($this->url['port']) ? 22 : (int) $this->url['port']]);
        if (isset($this->url['pass'])) {
            $this->protect('ssh2_auth_password', [$this->connection, urldecode($this->url['user']), urldecode($this->url['pass'])]);
        } else {
            $this->protect('ssh2_auth_agent', [$this->connection, urldecode($this->url['user'])]);
        }
        $this->sftp = $this->protect('ssh2_sftp', [$this->connection]);
    }