How to create SSH connection with "-s xmlagent" or "netconf" option

The -s switch on the SSH command line indicates that the server should start a subsystem.

The equivilent way of doing this in our client is to get hold of an Ssh2Session instance

Ssh2Session session = (Ssh2Session) ssh.openSessionChannel();

Then call its startSubsystem method


The InputStream/OutputStream of the session can then be used to communicate with that subsystem.

Have more questions? Submit a request


Please sign in to leave a comment.