The SFTPCommand implements FileSystemAware which means that the server you instanciate to handle SFTP calls must provide a FileSystemView (an abstraction to the FileSystem, customized for your command, exactly what you're looking for).
The best way to customize the root of your SFTP server is to implement org.apache.sshd.server.FileSystemFactory and provide them to your server. org.apache.sshd.SshServer (available in your Mina distribution) shows off an example of this. Fred On Mon, Dec 5, 2011 at 22:35, Heath, Bruce (Bruce) <hea...@avaya.com> wrote: > Hi, > > I am going to embed the SSH into an application where I want to use SFTP. > I would like to set the root directory from which SFTP file transfers occur. > Can someone point me to the code where I can set a new default root > directory for SFTP? > > Thanks > > Bruce > -- Frédéric Menou