Error Expected SSH_FXP_VERSION when connecting via php with phpseclib

2

When connecting to some devices, I'm getting this message:

  

Expected SSH_FXP_VERSION and the command does not execute.

I'm using php with phpseclib .

    
asked by anonymous 27.12.2013 / 19:30

1 answer

1

This error can be caused by a number of reasons, including:

  • Non-standard SSH protocol deployment on the router;

  • phpseclib constants not set correctly (mostly in some changes in it);

  • Authentication packet receive error (network problem);

  • Try to calmly look 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 at Net / SFTP.php

        
    27.12.2013 / 19:58