My first thought is that storing the connection in a session variable won't work because the code effectively exits, destroying the connection. If I am wrong in that, there would be your answer :-D
If I am right, you could think about a single (php) program ('service'), that keeps on running, which maintains the ftp connections, and provides an interface to these connections through (for instance) a socket connection. This connection only accepts local connections!
Your jQuery->Ajax call will start a new php program (of course), does some authentication and security checks (quite important), connects to the 'service' described above and communicates whatever is needed.
Alternatively, you could replace Ajax for a javascript-socket connection directly to the 'service'. Again, security is an important issue! I don't know if jQuery can help you out with that, I do believe Google has some libraries for this though.