public void run() {

	try {
	    String input = channel.setUp();
	    if (input != null) {
		System.out.println("Exec Mode");
		execute(input);
	    } else {
		System.out.println("Shell Mode");
		channel.write("Welcome to the SIRS SSH server!");

		String line;

		while ((line = channel.readLine()) != null) {

		    String[] opts = line.split("\\ ");

		    if (opts[0].equalsIgnoreCase("quit")) {
			channel.write("Now quitting. So long and thanks for all the fish!");
			break;
		    } else if (opts[0].trim().length() == 0) {
			channel.write("");
		    } else if (opts[0].equalsIgnoreCase("hello")) {
			execute("bash /speak.sh 'Hello and welcome to our presentation'");
			channel.write("Hello there, I'm the SIRS SSH server powered by group 2.");
		    } else
			execute(line);
		}

		// TODO Add more commands

	    }

	    channel.close(0);

	} catch (IOException e) {
	    e.printStackTrace();
	} catch (SecureChannelException e) {
	    e.printStackTrace();
	} finally {
	    if (!socket.isClosed()) {
		try {
		    socket.close();
		} catch (IOException e) {
		}
	    }
	    System.out.println("- Closing connection from socket " + socket + " -");
	}
    }