Package com.sun.enterprise.config.serverbeans

Examples of com.sun.enterprise.config.serverbeans.SshAuth


        SshConnector conn = node.getSshConnector();
        if (conn == null)
            throw new WindowsException(Strings.get("no.password"));

        SshAuth auth = conn.getSshAuth();
        if (auth == null)
            throw new WindowsException(Strings.get("no.password"));

        String notFinal = auth.getPassword();
        if (!ok(notFinal))
            throw new WindowsException(Strings.get("no.password"));

        password = DcomUtils.resolvePassword(notFinal);

        notFinal = node.getNodeHost();
        if (!ok(notFinal))
            notFinal = conn.getSshHost();
        if (!ok(notFinal))
            throw new WindowsException(Strings.get("no.host"));
        host = resolver.resolve(notFinal);

        notFinal = auth.getUserName();
        if (!ok(notFinal))
            notFinal = System.getProperty("user.name");
        if (!ok(notFinal))
            throw new WindowsException(Strings.get("no.username"));
        user = resolver.resolve(notFinal);
View Full Code Here


        //XXX Why do we need this again?  This is already done above and set to host
        String sshHost = connector.getSshHost();
        if (sshHost != null)
            this.host = sshHost;
       
        SshAuth sshAuth = connector.getSshAuth();
        String userName = null;
        if (sshAuth != null) {
            userName = sshAuth.getUserName();
            this.keyFile = sshAuth.getKeyfile();
            this.rawPassword = sshAuth.getPassword();
            this.rawKeyPassPhrase = sshAuth.getKeyPassphrase();
        }
        try {
            port = Integer.parseInt(connector.getSshPort());
        } catch(NumberFormatException nfe) {
            port = 22;
View Full Code Here

                            sshC.setSshPort(sshport);
                        if(sshnodehost != null)
                            sshC.setSshHost(sshnodehost);

                        if (sshuser != null || sshkeyfile != null || sshpassword != null || sshkeypassphrase != null ) {
                            SshAuth sshA = sshC.getSshAuth();
                            if (sshA == null) {
                               sshA = sshC.createChild(SshAuth.class);
                            } else
                                sshA = t.enroll(sshA);

                            if (sshuser != null)
                                sshA.setUserName(sshuser);
                            if (sshkeyfile != null)
                                sshA.setKeyfile(sshkeyfile);
                            if(sshpassword != null)
                                sshA.setPassword(sshpassword);
                            if(sshkeypassphrase != null)
                                sshA.setKeyPassphrase(sshkeypassphrase);
                            sshC.setSshAuth(sshA);
                        }
                        writeableNode.setSshConnector(sshC);

                    }
View Full Code Here

        if (remotePort == null) {
            remotePort = sshc.getSshPort();
        }

        SshAuth ssha = sshc.getSshAuth();
        if (ssha == null) {
            return;
        }

        if (remoteUser == null) {
            remoteUser = ssha.getUserName();
        }

        if (sshkeyfile == null) {
            sshkeyfile = ssha.getKeyfile();
        }

        if (remotepassword == null) {
            remotepassword = ssha.getPassword();
        }

        if (sshkeypassphrase == null) {
            sshkeypassphrase = ssha.getPassword();
        }
    }
View Full Code Here

        map.add(NodeUtils.PARAM_NODEDIR, node.getNodeDirAbsolute());

        SshConnector sshc = node.getSshConnector();
        if (sshc != null) {
            map.add(NodeUtils.PARAM_REMOTEPORT, sshc.getSshPort());
            SshAuth ssha = sshc.getSshAuth();
            map.add(NodeUtils.PARAM_REMOTEUSER, ssha.getUserName());
            map.add(NodeUtils.PARAM_SSHKEYFILE, ssha.getKeyfile());
            map.add(NodeUtils.PARAM_REMOTEPASSWORD, ssha.getPassword());
            map.add(NodeUtils.PARAM_SSHKEYPASSPHRASE, ssha.getKeyPassphrase());
            map.add(NodeUtils.PARAM_TYPE, node.getType());
        }

        validate(map);
        return;
View Full Code Here

     * @throws CommandValidationException
     */
    private void pingDcomConnection(Node node) throws CommandValidationException {
        try {
            SshConnector connector = node.getSshConnector();
            SshAuth auth = connector.getSshAuth();
            String host = connector.getSshHost();

            if (!StringUtils.ok(host))
                host = node.getNodeHost();

            String username = auth.getUserName();
            String password = resolvePassword(auth.getPassword());
            String installdir = node.getInstallDirUnixStyle();
            String domain = node.getWindowsDomain();

            if (!StringUtils.ok(domain))
                domain = host;
View Full Code Here

        if (remotePort == null) {
            remotePort = sshc.getSshPort();
        }

        SshAuth ssha = sshc.getSshAuth();
        if (ssha == null) {
            return;
        }

        if (remoteUser == null) {
            remoteUser = ssha.getUserName();
        }

        if (sshkeyfile == null) {
            sshkeyfile = ssha.getKeyfile();
        }

        if (remotepassword == null) {
            remotepassword = ssha.getPassword();
        }

        if (sshkeypassphrase == null) {
            sshkeypassphrase = ssha.getPassword();
        }
    }
View Full Code Here

        //XXX Why do we need this again?  This is already done above and set to host
        String sshHost = connector.getSshHost();
        if (sshHost != null)
            this.host = sshHost;
       
        SshAuth sshAuth = connector.getSshAuth();
        String userName = null;
        if (sshAuth != null) {
            userName = sshAuth.getUserName();
            this.keyFile = sshAuth.getKeyfile();
            this.rawPassword = sshAuth.getPassword();
            this.rawKeyPassPhrase = sshAuth.getKeyPassphrase();
        }
        try {
            port = Integer.parseInt(connector.getSshPort());
        } catch(NumberFormatException nfe) {
            port = 22;
View Full Code Here

        map.add(NodeUtils.PARAM_NODEDIR, node.getNodeDirAbsolute());

        SshConnector sshc = node.getSshConnector();
        if (sshc != null) {
            map.add(NodeUtils.PARAM_REMOTEPORT, sshc.getSshPort());
            SshAuth ssha = sshc.getSshAuth();
            map.add(NodeUtils.PARAM_REMOTEUSER, ssha.getUserName());
            map.add(NodeUtils.PARAM_SSHKEYFILE, ssha.getKeyfile());
            map.add(NodeUtils.PARAM_REMOTEPASSWORD, ssha.getPassword());
            map.add(NodeUtils.PARAM_SSHKEYPASSPHRASE, ssha.getKeyPassphrase());
            map.add(NodeUtils.PARAM_TYPE, node.getType());
        }

        validate(map);
        return;
View Full Code Here

     * @throws CommandValidationException
     */
    private void pingDcomConnection(Node node) throws CommandValidationException {
        try {
            SshConnector connector = node.getSshConnector();
            SshAuth auth = connector.getSshAuth();
            String host = connector.getSshHost();

            if (!StringUtils.ok(host))
                host = node.getNodeHost();

            String username = auth.getUserName();
            String password = resolvePassword(auth.getPassword());
            String installdir = node.getInstallDirUnixStyle();
            String domain = node.getWindowsDomain();

            if(!StringUtils.ok(domain))
                domain = host;
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.SshAuth

Copyright © 2018 www.massapicom. 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.