Query related to scp command

Hi Friends,

I need to execute a scp command to transfer some files from source to target server. Unfortunately the ftp is not working in my case.

This scp command needs to be executed via Unix script.

I need to know the complete scp command which includes the user-id and password of the remote server.

I know of the following command
scp *txt <remote-user-id>@<hostname>:<target directory>.
This command when executed asks for password which I need to enter manually. I need to get rid of this prompt asking for password by automatically including the user-id/password details in the scp command itself.

Can you please suggest

many thanks in advance,
Suresh

What about setting up key based authentication for ssh. That way you would not need to enter any password for ssh logins and scp transfers.

HTH

You might use "expect" also...