For remote connections, terminal indexes can only be used on the connection to which they were assigned.
See EPI security for more information. For local connections, all local JavaGateways can access terminal indexes on other local JavaGateways, provided they are in the same JVM.