code: func (c *ServerContext) SetAgent(a agent.Agent, channel ssh.Channel) {
  	c.Lock()
  	defer c.Unlock()
  	if c.agentChannel != nil {
  		c.Infof("closing previous agent channel")
  		c.agentChannel.Close()
  	}
  	c.agentChannel = channel
  	c.agent = a
  }
docs: // SetAgent sets the agent and channel over which communication with the agent occurs.