It should not be necessary. Closing the server should close all sessions and shells. I suppose you're using the latest 0.7.0 version. Isn't the Command#destroy() method called ?
On Sun, Sep 2, 2012 at 3:01 PM, Maarten Smit <[email protected]> wrote: > Hello, > > I have implemented SSHD with my own Shell Factory. Everything works great, > however, this doesn't work: > > 1. A user connects > 2. The user is done and closes the session without typing 'exit' first (if > the user quits correctly by typing exit through ssh everything works ok) > 3. The server is stopped > 4. The server is started again: that doesn't work since the port is still > in use, probably because there is still a shell session (since if the shell > is closed everything works). > > I have tried: > - setReuseAddress to true > - using sshd.getActiveSessions() to get all sessions and disconnecting each > one > > But it still doesn't work. So my question is, when the server is stopped, > how can I get access to each active shell outputstream so I can send the > 'exit' command? > > Thanks! > > Maarten > -- ------------------------ Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------------------------ FuseSource, Integration everywhere http://fusesource.com
