command= for each forwarded connection?

From: Bill McGonigle (mcgonigle@medicalmedia.com)
Date: 01/21/03

  • Next message: Sean Kamath: "Are remote pipes fixed in 3.5?"
    Date: Tue, 21 Jan 2003 12:51:10 -0500
    From: Bill McGonigle <mcgonigle@medicalmedia.com>
    To: secureshell@securityfocus.com
    
    

    Is there something like command= that will run each time a new
    forwarded TCP connection is initiated?

    For example, if I was forwarding an SMTP connection, the behavior I
    have is:

            ssh connects and sets up port forward
            command= is run
            SMTP session 1
            SMTP session 2
            SMTP session 3
            ssh connection is closed

    but what I'd like is:
            ssh connects and sets up port forward
            SMTP session 1 established
            command= is run
            SMTP session 2 established
            command= is run
            SMTP session 3
            command= is run
            ssh connection is closed

    Maybe there's an obvious way to do it that I'm missing, or perhaps
    somebody has a solution to approximate this behavior?

    Any wisdom appreciated.

    Thanks,
    -Bill