SCP transfer a file from localhost to a sftp server through php script

faseh

New Member
Hi Trying to send a file to another server using scp.. cannot use sftp as it is not installed on my server so i am getting a function not found for ssh2_connect.So my only option as i can see it is scp.Now the problem come with i cannot include my password in the php scp script.ie: \[code\]scp filename username:passwor@server:filename\[/code\]It gives me the error that the server username doesn't existIf i use it without the password \[code\]scp filename username@server:filename\[/code\]it prompts me for passwordPS: I am testing the script in a command line on the localhost first as to get the error messages.Any advice?TA
 
Back
Top