code: def disconnect(self, driver):
          
          self.log("SSH disconnect")
          try:
              self.device.ctrl.sendline('\x03')
              self.device.ctrl.sendline('\x04')
          except OSError:
              self.log("Protocol already disconnected")
docs: Disconnect using the protocol specific method.