I have a couple of machines that I use for purely automated stuff, with home directories encrypted using ecryptfs. So even if the machine is powered on, those directories aren't decrypted unless that user logs in (desired behavior). Now, I'd like to be able to run a server using one of these users (data stored therein), and I don't mind logging it in once when the service is started. However, I don't want to leave an open SSH session from another machine to the automated one.
My current strategy is a script that runs a localhost SSH session inside a screen process, which then detaches after logging in. This keeps the user "logged in to herself" as long as that screen process is running. I run this script from outside using SSH, and then drop the remote SSH session, leaving the localhost screen-ed SSH session running, keeping the ecryptfs directory mounted.
What are the security risks of this approach, if any?