Examples of PEMGeneratorHostKeyProvider


Examples of org.apache.sshd.server.keyprovider.PEMGeneratorHostKeyProvider

        System.err.println("Starting SSHD on port " + port);
                                                   
        SshServer sshd = SshServer.setUpDefaultServer();
        sshd.setPort(port);
        if (SecurityUtils.isBouncyCastleRegistered()) {
            sshd.setKeyPairProvider(new PEMGeneratorHostKeyProvider("key.pem"));
        } else {
            sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider("key.ser"));
        }
        if (OsUtils.isUNIX()) {
            sshd.setShellFactory(new ProcessShellFactory(new String[] { "/bin/sh", "-i", "-l" },
View Full Code Here

Examples of org.apache.sshd.server.keyprovider.PEMGeneratorHostKeyProvider

        sshServer.setPort(port);
        sshServer.setHost(bind);

        final String basePath = SystemInstance.get().getBase().getDirectory().getAbsolutePath();
        if (SecurityUtils.isBouncyCastleRegistered()) {
            sshServer.setKeyPairProvider(new PEMGeneratorHostKeyProvider(new File(basePath, KEY_NAME + ".pem").getPath()));
        } else {
            sshServer.setKeyPairProvider(new SimpleGeneratorHostKeyProvider(new File(basePath, KEY_NAME + ".ser").getPath()));
        }

        final OpenEJBShellFactory sf = new OpenEJBShellFactory(bind, port);
View Full Code Here

Examples of org.apache.sshd.server.keyprovider.PEMGeneratorHostKeyProvider

        System.err.println("Starting SSHD on port " + port);
                                                   
        SshServer sshd = SshServer.setUpDefaultServer();
        sshd.setPort(port);
        if (SecurityUtils.isBouncyCastleRegistered()) {
            sshd.setKeyPairProvider(new PEMGeneratorHostKeyProvider("key.pem"));
        } else {
            sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider("key.ser"));
        }
        if (OsUtils.isUNIX()) {
            sshd.setShellFactory(new ProcessShellFactory(new String[] { "/bin/sh", "-i", "-l" },
View Full Code Here

Examples of org.apache.sshd.server.keyprovider.PEMGeneratorHostKeyProvider

        sshServer.setPort(port);
        sshServer.setHost(bind);

        final String basePath = SystemInstance.get().getBase().getDirectory().getAbsolutePath();
        if (SecurityUtils.isBouncyCastleRegistered()) {
            sshServer.setKeyPairProvider(new PEMGeneratorHostKeyProvider(new File(basePath, KEY_NAME + ".pem").getPath()));
        } else {
            sshServer.setKeyPairProvider(new SimpleGeneratorHostKeyProvider(new File(basePath, KEY_NAME + ".ser").getPath()));
        }

        final OpenEJBShellFactory sf = new OpenEJBShellFactory(bind, port);
View Full Code Here

Examples of org.apache.sshd.server.keyprovider.PEMGeneratorHostKeyProvider

    if (serverKeyPath != null) {
      log.log(Level.FINE, "Found server key path " + serverKeyPath);
      File f = new File(serverKeyPath);
      String keyGen = getContext().getProperty(SSH_SERVER_KEYGEN);
      if (keyGen != null && keyGen.equals("true")) {
        keyPairProvider = new PEMGeneratorHostKeyProvider(serverKeyPath, "RSA");
      } else if (f.exists() && f.isFile()) {
        try {
          serverKeyURL = f.toURI().toURL();
          serverKey = new Resource("hostkey.pem", serverKeyURL);
        } catch (MalformedURLException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.