How to install apk/ipk in remote agent?

I have machine A in my place in which I have an agent, I gave access to machine B in remote.
My requirement is machine B has an APK it needs to install in machine A agent device and do some manual testing.

How to install apk/ipa in remote agent(machine A) from my local(Machine B)?

Note: I have a separate user account for machine A & B, machine A has an Agent with some authorized android devices.