diff --git a/wssh/server.py b/wssh/server.py index 17a4965..c566267 100644 --- a/wssh/server.py +++ b/wssh/server.py @@ -105,6 +105,11 @@ def open(self, hostname, port=22, username=None, password=None, self._websocket.send(json.dumps({'error': e.message or str(e)})) raise + def attach_open_session(self, ssh_client): + self.close() + self._ssh = ssh_client + + def _forward_inbound(self, channel): """ Forward inbound traffic (websockets -> ssh) """ try: