Copying the file from UNIX box to other

Hi Folks ,

I have two different unix boxes named lonrs2345 and lonrs2367 now i want to copy a file from lonrs2345 to lonrs2367 , now below is the location of file which i want to copy

lonrs2345 :- /opt/app/fgty/abc.xml
lonrs2367 :- /opt/app/fgty/

Now as you can see above i want to copy the abc.xml from source to destination, the credentials for both the unix machines are same that is

id : 1bc
passwd:- xyz

now please advise the command or script through which i can copy the file among the unix boxes.:confused::confused:

On unix boxes it does not matter that uid and password are the same, like it does on Windows, since this would be insecure.. You can generate ssh key pairs (private and public) and use the public key to give access for a user from one host to the other. Use a strong passphrase when generating the key and you could use an ssh agent to keep the key in memory..

Follow Scrutinizer's proposal, then look at the man pages for the usage of scp as this is the command you will be using for your request