SSHWrapperExample Not working...

  • The SSHWrapperExample is not working for me... i get some print statements like :
    remotemajor 1
    remoteminor 99

    nothing else.

    Can anyone paste some code that works for ssh...


    • MY tries were so far unsucessful, sorry.

      The SSHWrapper is not really finished yet,
      there is one or more bugs still in it.

      Ciao, Marcus

    • Hello,

      Can you post any code that makes use of your ssh apis ?
      i.e does ssh work at all ?


    • Hi Folks,

      Here is a fix for this issue.

      The user and password are not getting set before login.
      In, override's login method so the user and password get set.

      Add the following method to
      public void login(String user, String pwd) throws IOException {
          waitfor(getPrompt()); // throw output away

      The class SshWrapperExample in should be like so: 
      public class SshWrapperExample {
        public static void main(String args[]) {
          SshWrapper ssh = new SshWrapper();
          try {
            byte[] buffer = new byte[256];
            // Remote host name or ip address is passed as an argument
            ssh.connect(args[0], 22);
            ssh.login("marcus", "xxxxx");
            System.out.println("after login");

            ssh.send("ls -l");
            System.out.println(new String(buffer));
          } catch ( e) {

    • Hi friends ,
          its me Anu. i need a coding for connecting a java server and a unix server.
      By connecting java and unix only  futher i monitor the process going on in unix.
        if u know please sent me codings for that connectivity .
      my mail id is

                                           Thank u