Ticket #5508: twisted_ssh_less_noisy.diff

File twisted_ssh_less_noisy.diff, 5.2 KB (added by htj, 5 years ago)

Remove some log statements from conch.ssh

  • twisted/conch/ssh/transport.py

     
    536536            self.sendDisconnect(DISCONNECT_KEY_EXCHANGE_FAILED,
    537537                                "couldn't match all kex parts")
    538538            return
    539         log.msg('kex alg, key alg: %s %s' % (self.kexAlg, self.keyAlg))
    540         log.msg('outgoing: %s %s %s' % (self.nextEncryptions.outCipType,
    541                                         self.nextEncryptions.outMACType,
    542                                         self.outgoingCompressionType))
    543         log.msg('incoming: %s %s %s' % (self.nextEncryptions.inCipType,
    544                                         self.nextEncryptions.inMACType,
    545                                         self.incomingCompressionType))
    546539
    547540        if self._keyExchangeState == self._KEY_EXCHANGE_REQUESTED:
    548541            self._keyExchangeState = self._KEY_EXCHANGE_PROGRESSING
     
    606599
    607600        @type service: C{SSHService}
    608601        """
    609         log.msg('starting service %s' % service.name)
    610602        if self.service:
    611603            self.service.serviceStopped()
    612604        self.service = service
     
    705697        outs = [initIVSC, encKeySC, integKeySC]
    706698        ins = [initIVCS, encKeyCS, integKeyCS]
    707699        if self.isClient: # reverse for the client
    708             log.msg('REVERSE')
    709700            outs, ins = ins, outs
    710701        self.nextEncryptions.setKeys(outs[0], outs[1], ins[0], ins[1],
    711702                                     outs[2], ins[2])
     
    719710        and compression parameters should be adopted.  Any messages which were
    720711        queued during key exchange will also be flushed.
    721712        """
    722         log.msg('NEW KEYS')
    723713        self.currentEncryptions = self.nextEncryptions
    724714        if self.outgoingCompressionType == 'zlib':
    725715            self.outgoingCompression = zlib.compressobj(6)
  • twisted/conch/ssh/connection.py

     
    238238        if channel.localWindowLeft < channel.localWindowSize / 2:
    239239            self.adjustWindow(channel, channel.localWindowSize - \
    240240                                       channel.localWindowLeft)
    241             #log.msg('local window left: %s/%s' % (channel.localWindowLeft,
    242             #                                    channel.localWindowSize))
    243241        log.callWithLogger(channel, channel.dataReceived, data)
    244242
    245243    def ssh_CHANNEL_EXTENDED_DATA(self, packet):
     
    407405        @type channel:  subclass of C{SSHChannel}
    408406        @type extra:    C{str}
    409407        """
    410         log.msg('opening channel %s with %s %s'%(self.localChannelID,
    411                 channel.localWindowSize, channel.localMaxPacket))
    412408        self.transport.sendPacket(MSG_CHANNEL_OPEN, common.NS(channel.name)
    413409                    + struct.pack('>3L', self.localChannelID,
    414410                    channel.localWindowSize, channel.localMaxPacket)
     
    429425        """
    430426        if channel.localClosed:
    431427            return
    432         log.msg('sending request %s' % requestType)
    433428        self.transport.sendPacket(MSG_CHANNEL_REQUEST, struct.pack('>L',
    434429                                    self.channelsToRemoteChannel[channel])
    435430                                  + common.NS(requestType)+chr(wantReply)
     
    494489        """
    495490        if channel.localClosed:
    496491            return # we're already closed
    497         log.msg('sending eof')
    498492        self.transport.sendPacket(MSG_CHANNEL_EOF, struct.pack('>L',
    499493                                    self.channelsToRemoteChannel[channel]))
    500494
     
    506500        """
    507501        if channel.localClosed:
    508502            return # we're already closed
    509         log.msg('sending close %i' % channel.id)
    510503        self.transport.sendPacket(MSG_CHANNEL_CLOSE, struct.pack('>L',
    511504                self.channelsToRemoteChannel[channel]))
    512505        channel.localClosed = True
  • twisted/conch/ssh/userauth.py

     
    144144            if it failed.
    145145        @rtype: C{defer.Deferred}
    146146        """
    147         log.msg('%s trying auth %s' % (user, kind))
    148147        if kind not in self.supportedAuthentications:
    149148            return defer.fail(
    150149                    error.ConchError('unsupported authentication, failing'))
     
    523522                              if meth not in self.authenticatedWith],
    524523                             key=orderByPreference)
    525524
    526         log.msg('can continue with: %s' % canContinue)
    527525        return self._cbUserauthFailure(None, iter(canContinue))
    528526
    529527
     
    685683        if publicKey is not None:
    686684            self.lastPublicKey = publicKey
    687685            self.triedPublicKeys.append(publicKey)
    688             log.msg('using key of type %s' % publicKey.type())
    689686            self.askForAuth('publickey', '\x00' + NS(publicKey.sshType()) +
    690687                            NS(publicKey.blob()))
    691688            return True