For anyone having difficulties with the scp command using yubikey, here is the proper syntax I used to copy a file from a local machine to a remote server:

scp -i ~/.ssh/ -P 22 local_file_to_be_transferred.txt remote_username@local_server_ip_address:/remote/directory_of_server

where -i = your yubikey identities file, -P = your ssh port, remote_username = your username that you use to log in to your server

In my case:
scp -i ~/.ssh/ -P 40001 /Users/Danrancan/Downloads/ boopi@