I would like to know, is there somehow we can connect the port along with the server in laravel 5.2.
I would like to upload a file to a server using laravel package SSH.
Here is my connection,
'connections' => [
'runtime' => [
'host' => '',
'username' => '',
'password' => '',
'port' => '',
'key' => '',
'keytext' => '',
'keyphrase' => '',
'agent' => '',
'timeout' => 10,
],
],
And here goes my code to connect to the server at runtime,
Config::set('remote.connections.runtime.host', $domain_name.':'.$host_details['ftp_port']);
Config::set('remote.connections.runtime.username', $host_details['ftp_username']);
Config::set('remote.connections.runtime.password', $host_details['ftp_password']);
Config::set('remote.connections.runtime.port', $host_details['ftp_port']);
SSH::into('runtime')->run([
touch test.txt
]);
I've tried this as well
'connections' => [
'runtime' => [
'host' => '',
'username' => '',
'password' => '',
'key' => '',
'keytext' => '',
'keyphrase' => '',
'agent' => '',
'timeout' => 10,
],
],
Config::set('remote.connections.runtime.host', $domain_name.':'.$host_details['ftp_port'].':'.$host_details['ftp_port']);
Config::set('remote.connections.runtime.username', $host_details['ftp_username']);
Config::set('remote.connections.runtime.password', $host_details['ftp_password']);
SSH::into('runtime')->run([
touch test.txt
]);
In both cases, it is showing 110 timeout error. What am I doing wrong, can we connect to different ports through SSH. I can ssh using terminal. But not with Laravel.