I am trying to copy a file from my desktop to my remote server using the sudo command. I am doing this from the remote machine since I know the password for this machine and I do not have a password for my local machine.
sudo scp donj@localhost:/Desktop/my.cnf user@remotemachine:/app/MySQL/my.cnf
This does not work however. I want to overwrite the my.cnf file in the MySQL directory. I tried the su command but I do not have the password to become a super user.

sudodoes not copy anything nor connects to a remote machine. It is used to perform a command on behalf of another user (usually root) on the local computer. – buc Jun 3 '12 at 19:37