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

session.startSubsystem("xmlagent");

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

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.