This mostly isn't a Jenkins question, but I would think many people here would have to deal with this kind of situation.
I have a Jenkins pipeline job that produces a javadoc jar (among other products). I'm going to need to deploy that content into a directory tree on a remote box (using some variation of "scp", I assume), where the directory is owned by a particular non-root user, and this directory is a mapped volume to a Docker container running an apache instance.
I do have a "mechanical id" (you might call it a service account) that I use for automation tasks in bitbucket and jenkins. It presently isn't able to log into my javadoc box, but I have root rights on the box, so I could modify that.
I imagine I'll need to create an ssh key to use for this. Does that make sense here?