Examples of SshException


Examples of com.googlecode.gridkit.fabric.exec.ssh.SshException

    for(String host: hostMap.getKnownHosts()) {
      try {
        this.hosts.put(host, new SshManagedHost(host));
      }
      catch(JSchException e) {
        throw new SshException("Failed to connect " + host, e);
      }
    }
  }
View Full Code Here

Examples of com.sshtools.j2ssh.SshException

    protected void onCorruptMac() {
        log.fatal("Corrupt Mac on Input");

        // Send a disconnect message
        sendDisconnect(SshMsgDisconnect.MAC_ERROR, "Corrupt Mac on input",
            new SshException("Corrupt Mac on Imput"));
    }
View Full Code Here

Examples of net.schmizz.sshj.common.SSHException

    }

    @Override
    public void notifyUnimplemented(long seqNum)
            throws SSHException {
        throw new SSHException(DisconnectReason.PROTOCOL_ERROR, "Unexpected: SSH_MSG_UNIMPLEMENTED");
    }
View Full Code Here

Examples of net.schmizz.sshj.common.SSHException

        final File loc = new File(location);
        final FileKeyProvider.Format format = KeyProviderUtil.detectKeyFileFormat(loc);
        final FileKeyProvider fkp = Factory.Named.Util.create(trans.getConfig().getFileKeyProviderFactories(), format
                .toString());
        if (fkp == null)
            throw new SSHException("No provider available for " + format + " key file");
        fkp.init(loc, passwordFinder);
        return fkp;
    }
View Full Code Here

Examples of net.schmizz.sshj.common.SSHException

            throws IOException {
        final FileKeyProvider.Format format = KeyProviderUtil.detectKeyFileFormat(privateKey, publicKey != null);
        final FileKeyProvider fkp = Factory.Named.Util.create(trans.getConfig().getFileKeyProviderFactories(), format
                .toString());
        if (fkp == null)
            throw new SSHException("No provider available for " + format + " key file");
        fkp.init(privateKey, publicKey, passwordFinder);
        return fkp;
    }
View Full Code Here

Examples of net.schmizz.sshj.common.SSHException

        try {
            if (!close.isSet()) {

                log.error("Dying because - {}", ex.toString());

                final SSHException causeOfDeath = SSHException.chainer.chain(ex);

                disconnectListener.notifyDisconnect(causeOfDeath.getDisconnectReason());

                ErrorDeliveryUtil.alertEvents(causeOfDeath, close, serviceAccept);
                kexer.notifyError(causeOfDeath);
                getService().notifyError(causeOfDeath);
                setService(nullService);

                { // Perhaps can send disconnect packet to server
                    final boolean didNotReceiveDisconnect = msg != Message.DISCONNECT;
                    final boolean gotRequiredInfo = causeOfDeath.getDisconnectReason() != DisconnectReason.UNKNOWN;
                    if (didNotReceiveDisconnect && gotRequiredInfo)
                        sendDisconnect(causeOfDeath.getDisconnectReason(), causeOfDeath.getMessage());
                }

                finishOff();

                close.set();
View Full Code Here

Examples of net.schmizz.sshj.common.SSHException

        protected void init(PublicKey key)
                throws SSHException {
            this.key = key;
            this.type = KeyType.fromKey(key);
            if (type == KeyType.UNKNOWN)
                throw new SSHException("Unknown key type for key: " + key);
        }
View Full Code Here

Examples of net.schmizz.sshj.common.SSHException

        protected void init(String typeString, String keyString)
                throws SSHException {
            this.sKey = keyString;
            this.type = KeyType.fromString(typeString);
            if (type == KeyType.UNKNOWN)
                throw new SSHException("Unknown key type: " + typeString);
        }
View Full Code Here

Examples of net.schmizz.sshj.common.SSHException

        public SimpleEntry(String line)
                throws SSHException {
            final String[] parts = line.split(" ");
            if (parts.length != 3)
                throw new SSHException("Line parts not 3: " + line);
            hosts = Arrays.asList(parts[0].split(","));
            init(parts[1], parts[2]);
        }
View Full Code Here

Examples of net.schmizz.sshj.common.SSHException

        public HashedEntry(String line)
                throws IOException {
            final String[] parts = line.split(" ");
            if (parts.length != 3)
                throw new SSHException("Line parts not 3: " + line);
            hashedHost = parts[0];
            {
                final String[] hostParts = hashedHost.split("\\|");
                if (hostParts.length != 4)
                    throw new SSHException("Unrecognized format for hashed hostname");
                salt = hostParts[2];
            }
            init(parts[1], parts[2]);
        }
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.