public function login() {
        $username = $this->getAuthenticator()->getPasswordAuthentication()->getUsername();
        $password = $this->getAuthenticator()->getPasswordAuthentication()->getPassword();
        if (false === ssh2_auth_password($this->getConnection(), $username, $password)) {
            throw $this->newFTPException("login failed");
        }
        return $this;
    }
public function login() {
        $username = $this->getAuthenticator()->getPasswordAuthentication()->getUsername();
        $password = $this->getAuthenticator()->getPasswordAuthentication()->getPassword();
        if (false === ssh2_auth_password($this->getConnection(), $username, $password)) {
            throw $this->newFTPException("login failed");
        }
        return $this;
    }
public function login ( ) { $ username = $ this -> getAuthenticator ( ) -> getPasswordAuthentication ( ) -> getUsername ( ) ; $ password = $ this -> getAuthenticator ( ) -> getPasswordAuthentication ( ) -> getPassword ( ) ; if ( false === ssh2_auth_password ( $ this -> getConnection ( ) , $ username , $ password ) ) { throw $ this -> newFTPException ( "login failed" ) ; } return $ this ; }
Logs in to this SFTP connection.

@return SFTPClient Returns this SFTP client.
@throws FTPException Throws a FTP exception if an I/O error occurs.
Logs in to this SFTP connection .