private synchronized void handleSshAuthenticated(final NettyAwareClientSession newSession,
final ChannelHandlerContext ctx) {
- try {
- LOG.debug("SSH session authenticated on channel: {}, server version: {}", ctx.channel(),
- newSession.getServerVersion());
+ LOG.debug("SSH session authenticated on channel: {}, server version: {}", ctx.channel(),
+ newSession.getServerVersion());
+ try {
channel = newSession.createSubsystemChannel(SUBSYSTEM, ctx);
channel.setStreaming(ClientChannel.Streaming.Async);
channel.open().addListener(future -> {
handleSshSetupFailure(ctx, future.getException());
}
});
-
-
} catch (final IOException e) {
handleSshSetupFailure(ctx, e);
}