protected void sendInitialServiceRequest() throws IOException { if (initialServiceRequestSent) { return; } initialServiceRequestSent = true; log.debug("Send SSH_MSG_SERVICE_REQUEST for {}", currentServiceFactory.getName()); Buffer request = createBuffer(SshConstants.SSH_MSG_SERVICE_REQUEST); request.putString(currentServiceFactory.getName()); writePacket(request); // Assuming that MINA-SSHD only implements "explicit server authentication" it is permissible // for the client's service to start sending data before the service-accept has been received. // If "implicit authentication" were to ever be supported, then this would need to be // called after service-accept comes back. See SSH-TRANSPORT. currentService.start(); }
private String nextServiceName() { synchronized (lock) { return nextServiceFactory.getName(); } }