agent: Replace es_mopen by es_fopenmem for ssh.