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

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


    });
    this.server.setPort(this.port);
    this.server.setKeyPairProvider(new SimpleGeneratorHostKeyProvider("hostkey.ser"));
    this.server.setSubsystemFactories(Collections.<NamedFactory<Command>>singletonList(new SftpSubsystem.Factory()));
    final String virtualDir = new FileSystemResource("").getFile().getAbsolutePath();
    this.server.setFileSystemFactory(new NativeFileSystemFactory() {

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


                new SignatureDSA.Factory(),
                new SignatureRSA.Factory()));
        client.setChannelFactories(Arrays.<NamedFactory<Channel>>asList(
                new TcpipServerChannel.ForwardedTcpipFactory()));
        client.setServerKeyVerifier(AcceptAllServerKeyVerifier.INSTANCE);
        client.setFileSystemFactory(new NativeFileSystemFactory());
        client.setTcpipForwarderFactory(new DefaultTcpipForwarderFactory());
        return client;
    }
View Full Code Here

                new ChannelSession.Factory(),
                new TcpipServerChannel.DirectTcpipFactory()));
        sshd.setSignatureFactories(Arrays.<NamedFactory<Signature>>asList(
                new SignatureDSA.Factory(),
                new SignatureRSA.Factory()));
        sshd.setFileSystemFactory(new NativeFileSystemFactory());
        sshd.setTcpipForwarderFactory(new DefaultTcpipForwarderFactory());
        return sshd;
    }
View Full Code Here

                new HMACSHA196.Factory(),
                new HMACMD596.Factory()));
        client.setChannelFactories(Arrays.<NamedFactory<Channel>>asList(
                new TcpipServerChannel.ForwardedTcpipFactory()));
        client.setServerKeyVerifier(AcceptAllServerKeyVerifier.INSTANCE);
        client.setFileSystemFactory(new NativeFileSystemFactory());
        client.setTcpipForwarderFactory(new DefaultTcpipForwarderFactory());
        return client;
    }
View Full Code Here

                new HMACSHA196.Factory(),
                new HMACMD596.Factory()));
        sshd.setChannelFactories(Arrays.<NamedFactory<Channel>>asList(
                new ChannelSession.Factory(),
                new TcpipServerChannel.DirectTcpipFactory()));
        sshd.setFileSystemFactory(new NativeFileSystemFactory());
        sshd.setTcpipForwarderFactory(new DefaultTcpipForwarderFactory());
        sshd.setGlobalRequestHandlers(Arrays.<RequestHandler<ConnectionService>>asList(
                new KeepAliveHandler(),
                new NoMoreSessionsHandler(),
                new TcpipForwardHandler(),
View Full Code Here

public class VirtualFileSystemTest extends BaseTest {

    @Test
    public void testNativeFileSystem() throws IOException {
        String homeDir = System.getProperty("user.dir");
        NativeFileSystemFactory vfs = new NativeFileSystemFactory();

        FileSystemView view = vfs.createFileSystemView(new TestSession());

        SshFile file = view.getFile("foo");
        String physicalName = ((NativeSshFile) file).getNativeFile().getAbsolutePath();
        assertEquals(homeDir + File.separator + "foo", physicalName);
View Full Code Here

                new HMACSHA196.Factory(),
                new HMACMD596.Factory()));
        sshd.setChannelFactories(Arrays.<NamedFactory<Channel>>asList(
                new ChannelSession.Factory(),
                new TcpipServerChannel.DirectTcpipFactory()));
        sshd.setFileSystemFactory(new NativeFileSystemFactory());
        sshd.setTcpipForwarderFactory(new DefaultTcpipForwarderFactory());
        sshd.setGlobalRequestHandlers(Arrays.<RequestHandler<ConnectionService>>asList(
                new KeepAliveHandler(),
                new NoMoreSessionsHandler(),
                new TcpipForwardHandler(),
View Full Code Here

                new HMACSHA196.Factory(),
                new HMACMD596.Factory()));
        client.setChannelFactories(Arrays.<NamedFactory<Channel>>asList(
                new TcpipServerChannel.ForwardedTcpipFactory()));
        client.setServerKeyVerifier(AcceptAllServerKeyVerifier.INSTANCE);
        client.setFileSystemFactory(new NativeFileSystemFactory());
        client.setTcpipForwarderFactory(new DefaultTcpipForwarderFactory());
        return client;
    }
View Full Code Here

                new HMACSHA196.Factory(),
                new HMACMD596.Factory()));
        client.setChannelFactories(Arrays.<NamedFactory<Channel>>asList(
                new TcpipServerChannel.ForwardedTcpipFactory()));
        client.setServerKeyVerifier(AcceptAllServerKeyVerifier.INSTANCE);
        client.setFileSystemFactory(new NativeFileSystemFactory());
        client.setTcpipForwarderFactory(new DefaultTcpipForwarderFactory());
        return client;
    }
View Full Code Here

                new HMACSHA196.Factory(),
                new HMACMD596.Factory()));
        sshd.setChannelFactories(Arrays.<NamedFactory<Channel>>asList(
                new ChannelSession.Factory(),
                new TcpipServerChannel.DirectTcpipFactory()));
        sshd.setFileSystemFactory(new NativeFileSystemFactory());
        sshd.setTcpipForwarderFactory(new DefaultTcpipForwarderFactory());
        sshd.setGlobalRequestHandlers(Arrays.<RequestHandler<ConnectionService>>asList(
                new KeepAliveHandler(),
                new NoMoreSessionsHandler(),
                new TcpipForwardHandler(),
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.