Darren Tucker dtucker at
Tue Dec 16 10:02:48 EST 2003

Veiel Uwe wrote:
> for security logging purposes, I would like to record the
 > actual remote port an ssh connection uses after the connection
 > has been established. Could someone kindly point me to the part
 > of the ssh client source code where such information is
> available?

You mean the other end of the TCP connection to the server's port 22? 
That is already logged to wherever syslog is configured to go to (see 
LogLevel and SysLogFacility in "man sshd_config"), eg:

Dec 13 00:18:52 gate sshd[12258]: Accepted password for dtucker from port 54496 ssh2

Darren Tucker (dtucker at
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
     Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

More information about the openssh-unix-dev mailing list