Package org.apache.sshd.common.file.nativefs

Examples of org.apache.sshd.common.file.nativefs.NativeFileSystemFactory


      deleteFile(tempPrivateKeyFile);
   }

   private void setupSSHServer() throws IOException {
      sshd = SshServer.setUpDefaultServer();
      sshd.setFileSystemFactory(new NativeFileSystemFactory());
      sshd.setPort(port);
      sshd.setShellFactory(new ProcessShellFactory());
      sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider(tempPrivateKeyFile));
      sshd.setCommandFactory(new ScpCommandFactory());
      sshd.setCommandFactory(new ScpCommandFactory(new CommandFactory() {
View Full Code Here


    });
    server.setPort(port);
    server.setKeyPairProvider(new SimpleGeneratorHostKeyProvider("hostkey.ser"));
    SftpSubsystem.Factory sftp = new SftpSubsystem.Factory();
    server.setSubsystemFactories(Arrays.<NamedFactory<Command>> asList(sftp));
    server.setFileSystemFactory(new NativeFileSystemFactory() {

      @Override
      public FileSystemView createFileSystemView(org.apache.sshd.common.Session session) {
        return new NativeFileSystemView(session.getUsername(), false) {
View Full Code Here

TOP

Related Classes of org.apache.sshd.common.file.nativefs.NativeFileSystemFactory

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.