Package com.sshtools.j2ssh

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


        try {
            // Wait for the accept message, if the service is not accepted the
            // transport protocol disconencts which should cause an excpetion
            msg = ms.getMessage(SshMsgServiceAccept.SSH_MSG_SERVICE_ACCEPT);
        } catch (InterruptedException ex) {
            throw new SshException(
                "The thread was interrupted whilst waiting for a transport protocol message");
        }

        return;
    }
View Full Code Here

*
* @throws SshException
*/
    public void connect() throws SshException {
        if (getCurrentConnectionProfile() == null) {
            throw new SshException(
                "Can't connect, no connection profile have been set.");
        }

        //  There isn't anywhere to store this setting yet
        connect(getCurrentConnectionProfile(), false);
View Full Code Here

                    return false;
                }
            } catch (MessageStoreEOFException mse) {
                throw new IOException(mse.getMessage());
            } catch (InterruptedException ex) {
                throw new SshException(
                    "The thread was interrupted whilst waiting for a connection protocol message");
            }
        //}
    }
View Full Code Here

               
                break;
              }
              }
            } catch (InterruptedException ex) {
                throw new SshException(
                    "The thread was interrupted whilst waiting for a connection protocol message");
            }
        }

        return success;
View Full Code Here

                    return ((SshMsgRequestSuccess) reply).getRequestData();
                }

                case SshMsgRequestFailure.SSH_MSG_REQUEST_FAILURE: {
                    log.debug("Global request failed");
                    throw new SshException("The request failed");
                }
                }
            } catch (InterruptedException ex) {
                throw new SshException(
                    "The thread was interrupted whilst waiting for a connection protocol message");
            }
        }

        return null;
View Full Code Here

        transport.sendMessage(msg, this);

        try {
            msg = messageStore.getMessage(resultFilter);
        } catch (InterruptedException ex) {
            throw new SshException(
                "The thread was interrupted whilst waiting for an authentication message");
        }

        if (msg instanceof SshMsgUserAuthFailure) {
            return ((SshMsgUserAuthFailure) msg).getAvailableAuthentications();
View Full Code Here

                }
            }

            return tse.getState();
        } catch (InterruptedException ex) {
            throw new SshException(
                "The thread was interrupted whilst waiting for an authentication message");
        }
    }
View Full Code Here

            return parseMessage(msg);
        } catch (MessageStoreEOFException meof) {
            throw new AuthenticationProtocolException("Failed to read messages");
        } catch (InterruptedException ex) {
            throw new SshException(
                "The thread was interrupted whilst waiting for an authentication message");
        }
    }
View Full Code Here

            log.error(
                "Failed to retreive banner becasue the message store is EOF");

            return "";
        } catch (InterruptedException ex) {
            throw new SshException(
                "The thread was interrupted whilst waiting for an authentication message");
        }
    }
View Full Code Here

TOP

Related Classes of com.sshtools.j2ssh.SshException

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.