I have a Laravel 4.2 project hosted on a single server (Server A ), and I need to be able to download files from this application, and the files will be transferred to a Windows server located on the same local network (server B ).
I installed OpenSSH on a Windows server and started the service. I can confirm that this works because I can successfully connect in the terminal on server A.
In the Laravel project, I created a connection in the app / config / remote.php file.
But when I try to run the command in a Laravel project on server A using the following code:
SSH::into('ServerB')->run(['IF EXIST folder (echo YES) ELSE (echo NO)'], function($line){ echo $line.PHP_EOL; });
I get the following error:
unpack(): Type N: not enough input, need 4, have 1
I get this error for every command I try to run on server B. Oddly enough, if I try to use the same code, but point it to a Linux server, the code will work fine. This would make me believe that the SSH server was probably configured incorrectly on server B , but the fact that I can connect via SSH to server B from server A in the terminal window is a bit confusing!
Does anyone know the meaning of the error I get?
source share