Hi,
I have almost all my MK devices in ros4.x, and only one with ros5.rc11.
I can upload files via SFTP in ros4.x, bot I can upload rsc file in MK with ros5.rc11.
In the log the following error message appears:
ssh error expected: 50 got:90
I do not understand the error. Can you give me more information?
My PHP code where I do the sft is:
$filename = 'prueba_test.rsc';
$contect = 'several mikrotik command line instructions';
$methods = array( 'kex' => 'diffie-hellman-group1-sha1',
'client_to_server' => array( 'crypt' => '3des-cbc', 'comp' => 'none'),
'server_to_client' => array( 'crypt' => 'aes256-cbc,aes192-cbc,aes128-cbc', 'comp' => 'none')
);
$connection = ssh2_connect('192.168.1.65,'22, $methods);
ssh2_auth_password($connection, 'my_username', 'my_password');
$sftp = ssh2_sftp($connection);
/*
* Cremos los descriptores de fichero: uno en el Mikrotik remoto y otro con el servidor de backup
*/
$fd = fopen("ssh2.sftp://$sftp/$filename", 'w');
if (! $fd )
die("ERROR: Imposible create $filename <br>");
// Write in the file descriptor
$long = fprintf($fd, '%s', $content);
if( $long )
echo "Backup remoto create successfully: $filename<br>";
fclose( $fd );