private function loginWithPassword()
    {
        $password = $this->sshConfig['password'];
        if (!is_string($password)) {
            $password = $this->askForPassword(
                sprintf(
                    'Password for %s@%s:%s: ',
                    $this->sshConfig['username'],
                    $this->sshConfig['host'],
                    $this->sshConfig['port']
                )
            );
        }

        if (!$this->ssh->login($this->sshConfig['username'], $password)) {
            throw new SshLoginException($this->name);
        }

        return true;
    }
private function loginWithPassword()
    {
        $password = $this->sshConfig['password'];
        if (!is_string($password)) {
            $password = $this->askForPassword(
                sprintf(
                    'Password for %s@%s:%s: ',
                    $this->sshConfig['username'],
                    $this->sshConfig['host'],
                    $this->sshConfig['port']
                )
            );
        }

        if (!$this->ssh->login($this->sshConfig['username'], $password)) {
            throw new SshLoginException($this->name);
        }

        return true;
    }
private function loginWithPassword ( ) { $ password = $ this -> sshConfig [ 'password' ] ; if ( ! is_string ( $ password ) ) { $ password = $ this -> askForPassword ( sprintf ( 'Password for %s@%s:%s: ' , $ this -> sshConfig [ 'username' ] , $ this -> sshConfig [ 'host' ] , $ this -> sshConfig [ 'port' ] ) ) ; } if ( ! $ this -> ssh -> login ( $ this -> sshConfig [ 'username' ] , $ password ) ) { throw new SshLoginException ( $ this -> name ) ; } return true ; }
Login to server using username and password.

@return bool

@throws SshLoginException
Login to server using username and password .