<div class="gmail_quote">On Mon, Sep 28, 2009 at 8:10 PM, Benjamin Rutt <span dir="ltr"><<a href="mailto:rutt.4@osu.edu">rutt.4@osu.edu</a>></span> wrote:<br><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>But, it seems the recvline.HistoricRecvLine class wants me to use self.terminal rather than self.transport to talk to the client. That's fine, but it seems that self.terminal lacks a getPeer() method. How do I find out the IP address of the client inside a conch ssh server? (For starters, I wish to log all successful client connections so I know who's connecting).<br>
</div></blockquote><div><br>So, after reading through the code a bit, self.terminal should be an ITerminalTransport. There are only a few ITerminalTransport implementations, several of which are also Protocol subclasses and therefore have a 'transport' attribute.<br>
<br>I'm not 100% sure what the eventual composiiton of your application will be, but you could try self.terminal.transport.getPeer(); it might work.<br><br></div></div>Technically speaking, ITerminalTransport is a subclass of ITransport, which has a getPeer method. Therefore any classes which implement ITerminalTransport without providing getPeer are buggy. It would be really helpful if you could provide a patch that addressed the issue you mention :).<br>
<br>