Antonio,

I think you can achieve what you are looking for by creating your own
subclass of org.apache.sshd.server.FileSystemFactory which returns
your subclass of the org.apache.sshd.server.FileSystemView.

You then override  the
  public SshFile getFile(SshFile baseDir, String file)
method to return the SshFile that returns the list you need in the
listSshFiles() call.

You can set the fileSystemFactory like this:
  <bean id="sshdServer" class="org.apache.sshd.SshServer"
factory-method="setUpDefaultServer">
....
  <property name="fileSystemFactory" ref="fileSystemFactory"/>
..
</bean>

On Fri, Feb 3, 2012 at 12:29 PM, Antonio Rodriges <[email protected]> wrote:
> Hello,
>
> Is it possible to define a class for which SSHD will forward incoming
> user commands?
> I mean is it possible to define own command interpreter?
>
> For example, I would like that "ls" command will connect to a database
> and respond to user by a certain list.
>
> Thank you
> Antonio

Reply via email to