Hi guys ,
I am transferring a file on remote host using openssh package using function scp_put(), the place where i intend to transfer this file has to be under certain directory which also should be created by us based on a uid/date.
but it throws me error that transfer failed coz directory is not present on remote host.
so how do i create this directory remotely.
for example :
$sourcedir = "/tmp/xyz/test.tar";
$remotedir = "/tmp/some-dir/myfolder_uid_date/";
ssh->scp_put ( $sourcedir, $remotedir); or die "scp failed";
the output should be i should be able to transfer test.tar in the remote dir path, but i need to create this remote dir path on the fly or from host itself. how can i achieve this ? right now i get error no such file or directory /tmp/some-dir/myfolder_uid_date/