FileSystemView was introduced for this purpose. If you are using version 0.14.0 , the following will work:
sshServer.setFileSystemFactory(new VirtualFileSystemFactory(new File("admin").getAbsolutePath()));
I also have a working example here . I just need to figure out how to set the home directory dynamically.
Hooli source share