Menu

sftp lrm??

Help
2003-07-29
2003-08-06
  • Tristan Bezotte

    Tristan Bezotte - 2003-07-29

    All,

    I'm making an Sftp connection thusly:

          String hostname = "okok.stuff.com";

          // Make a client connection
          System.out.println("making conn object ");
          SshClient ssh = new SshClient();

          // Connect to the host
          System.out.print("making conn");
          ssh.connect(hostname);

          // Create a password authentication instance

          PasswordAuthenticationClient pwd = new PasswordAuthenticationClient();

          // Get the users name

          //String username = reader.readLine();
          String username = "user";
          pwd.setUsername(username);

          // Get the password

          String password = "password";
          pwd.setPassword(password);
         
           if (result == AuthenticationProtocolState.COMPLETE) {
            SftpClient sftp = ssh.openSftpClient();
            sftp.cd("/");
    ...}

    and the problem I'm running into is I don't seem to have acces to any kind of local remove function ( like lrm in sftp through the console ).

       Does anyone know of such a command? 
    Does anyone know if there is any doco for the methods listed above?  I have not been able to find anything in the javadoc.

       Thanks in advance,

          Tristan

     
    • Lee David Painter

      File f = new File("myfile");
      f.delete();

      :P

      There are some javadocs in the source that are work in progress.

       
    • Tristan Bezotte

      Tristan Bezotte - 2003-08-06

      Right on...

        That is the course I took too.

           Thanks for the info though,

        Tristan

       

Log in to post a comment.

MongoDB Logo MongoDB