I am not sure I understand exactly what you mean - however, it seems that you are on the right track. Assuming indeed that SFTPMinaClientConnector is a prototype bean all you need to do is initialize a session + SFTP on connect and tear them down on close. From what you describe though, it seems that your implementation of the SFTPMinaClientConnector is somehow not a true prototype bean. If it were, then each thread would receive a fresh (!) instance with its own session, so closing it would not affect the instances being used by other threads. In order words, make sure each thread opens its own session and closes it once finished,
>> Do the connections get cached for every user? No, there is no such caching by MINA SSHD >> How can I have a different connection object for the same user Just create a new session to the same user - each session is independent regardless of whether it is connected to the same user as another one.
