Subject: [netconf] Question about RFC 6242 : netconf over ssh

From: "Jeffrey Ladouceur (jladouce)" <[email-masked]>
Date: Thu, 7 May 2020 20:58:40 +0000

Hello,

I would like some input on a the following use-case and possible acceptable outcomes. 

Summary:

RFC 6242 doesn't explicitly indicate any lower level messaging in RFC 4254 which could "break" the netconf messaging between client and server.
Specifically, the client can send a https://tools.ietf.org/html/rfc4254#section-6. "pty-req" just prior to invoking the "netconf" ssh subsystem.
Having a pseudo-terminal device in between the client-server could result in the breakage of the messaging being client/server. 

RFC 6242 states:
https://tools.ietf.org/html/rfc6242#section-3 (Starting NECONF over SSH)

1. Once the user has been successfully authenticated, the SSH client will invoke the "ssh-connection" service, also known as the SSH connection protocol.
2. After the ssh-connection service is established, the SSH client will open a channel of type "session", which will result in an SSH session.
3. Once the SSH session has been established, the NETCONF client will invoke NETCONF as an SSH subsystem called "netconf".
4. Running NETCONF as an SSH subsystem avoids the need for the script to recognize shell prompts or skip over extraneous information, such as a system message that is sent at shell start-up.

If I were to translate these steps into the corresponding RFC 4254 messages.
 
Step (2) translates to:
https://tools.ietf.org/html/rfc4254#section-6.1 (Opening a Session) , upon which a session has been established
 
Step (3), this translates to https://tools.ietf.org/html/rfc4254#section-6.5 (Starting a Shell or a Command), but specifically the "subsystem" variant.
With a string of “subsystem” and “subsystem name” set to netconf.

Question:
1- Does  RFC 6242 imply that it expects direct client/server connection without any interference from a pty device ? The text in item (4) appears to me to imply this.

From what I can tell, the usage of this pty pattern is when a client wants netconf over tty.

Thank you for any feedback.

Regards,
Jeff