Error Expected SSH_FXP_VERSION when connecting via php with phpseclib

Asked

Viewed 146 times

2

When connecting on some equipment I’m getting this message:

Expected SSH_FXP_VERSION and command not executed.

I’m using php with phpseclib.

1 answer

1

This error can be caused by several reasons, among them:

  1. Non-standard deployment of the SSH protocol on the router;

  2. phpseclib constants not defined correctly (mainly in some changes in it);

  3. Authentication packet receiving error (network problem);

Try to look calmly at the library deployment, the block that returns the error is this:

$response = $this->_get_sftp_packet();
if ($this->packet_type != NET_SFTP_VERSION) {
    user_error('Expected SSH_FXP_VERSION');
    return false;
}

can be found in Net/SFTP.php

Browser other questions tagged

You are not signed in. Login or sign up in order to post.