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:

SYNTAX:
scp -i ~/.ssh/id_rsa_yubikey.pub -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/id_rsa_yubikey.pub -P 40001 /Users/Danrancan/Downloads/myfile.zip Danran@192.168.1.2:/home/Danrancan

DONATE! If this tutorial it worked for you (which it should have), you could spread the love back and donate some change to my paypal, bitcoin address, or altcoin addresses.

PAYPAL:

BITCOIN (BTC) ADDRESS:

bc1qxsqy0nl8f2rqsgpzzr8eh3c67vz7kjr2djyku4

BITCOIN CASH (BCH) ADDRESS:

qzdkv8sz8zf57urafd8urhg7jdej6u892v3z088nvr

ETHEREUM (ETH) ADDRESS:

0x8C33CD44a083D605DBb65Ba4eC201f30Af88705c

ZCASH (ZEC) ADDRESS:

t1dxu9KN1pSYNoMNxYMzCNhcHJhGZmwPW9n

MONERO (XMR) ADDRESS:

4A2p4k6vSGviUxoZvwQkAX8VBQE6tQncmZUS5mZ8YS9cZ2BQ4cc2CZXdMVg4vtFoxh3XrXQECWm95Gq2FpyRtvFz2yNZuYy

FINISHED! Congratulations, you have successfully converted your images to webP format with Imagemagick on Mac OS.