문제

When I connect using Twisted conch I get Packet integrity error (6 bytes remaining) at serverloop.c:980 in the /var/log/secure.log After that the connection gets dropped ("Disconnecting: Packet integrity error")

The server is a VMware system, no firewalls or other security is between the systems. I also see that the authentication runs successfully (Accepted password for from port ssh2).

My ssh.py is nearly the same as the example:

class SSHCommandChannel(channel.SSHChannel):
    name = "session"
    def __init__(self, eventparser, *args, **kwargs):
        channel.SSHChannel.__init__(self, *args, **kwargs)

    def _cbSendRequest(self, data):
        print("%s" % data)
        self.conn.sendEOF(self)

    def channelOpen(self, data):
        d = self.conn.sendRequest(self, 'exec', common.NS(data), wantReply=True)
        d.addCallback(self._cbSendRequest)
        return None

    def extReceived(self, dataType, data):
        self.dataRecieved(data)

    def dataRecieved(self, data):
        print("w00t: %s" % data)

    def closed(self):
        print("Channel closed =(")

I have no idea how to continue my quest on getting this example to work. Any advice would be appreciated.

올바른 솔루션이 없습니다

다른 팁

My guess is that you're passing strange data to the exec request. I don't recall offhand what the data passed to the client side of a channel is, but you probably don't want to be sending it back to the server. The server is expecting an NS-encoded command to execute, not random data. Unfortunately I can't reproduce the error your seeing here on my Mac, but hopefully this points you in the right direction!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top