By default any code deployed to RStudio connect is executed by the rstudio-connect user, c.f. Process Management - RStudio Connect: Admin Guide, though that can be changed. But regardless of who executes the code, the SSH key needs to be available for that user on the server running Rstudio Connect. So one possibility would be to transfer the key via scp.
Include the SSH key in the bundle that you publish, making it artifact specific.
Put the SSH key into an environment variable in Connect, again making it artifact specific.
Create an additional RunAs user on Connect and put the SSH key into that user's HOME. An admin on Connect will then be able to select this special RunAs user for those artifacts that need it.