We can use scp command for moving files from current to destination directory.
if ($request->hasFile('front_picture_path')) {
$file = $request->file('front_picture_path');
$filename = $file->getClientOriginalName();
// Store temporarily in storage
$tempPath = $file->storeAs('temp', $filename);
$remoteUser = 'myusername';
$remoteHost = 'myhost';
$remotePath = "mypath";
$password = 'mypassword';
$scpCommand = "scp " . storage_path("app/{$tempPath}") . " {$remoteUser}@{$remoteHost}:{$remotePath}";
shell_exec($scpCommand);
If you are using a password,then create a Pem file and transfer files using pem key without passowrd.