Stephan,
Good afternoon. Are you trying to SFTP from a client through the gateway to a SFTP server in the backend or simply trying to send a file from the Gateway to the SFTP server with some other transport on the inbound connection?
If you are looking to send a file to be passed from the frontend to the backend SFTP server you will need to setup a Listen Port for SSH2 with a private key on the Gateway which it appears you have done. The available commands allow will be important from the back and forth communication. On the Route to SSH2, will need to have either the private key or password entered into the Manage Stored Password interface. Which are you using private key or password?
I've attached a sample xml for the assertion that is :
<?xml version="1.0" encoding="UTF-8"?>
<wsp:Policy xmlns:L7p="http://www.layer7tech.com/ws/policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy">
<wsp:All wsp:Usage="Required">
<L7p:SshRouteAssertion>
<L7p:CommandTypeVariableName stringValue="request.command.type"/>
<L7p:Directory stringValue="${request.ssh.path}"/>
<L7p:DownloadContentType stringValue="text/xml; charset=utf-8"/>
<L7p:FileLength stringValue="${request.command.parameter.length}"/>
<L7p:FileName stringValue="${request.ssh.file}"/>
<L7p:FileOffset stringValue="${request.command.parameter.offset}"/>
<L7p:Host stringValue="foo.ca.com"/>
<L7p:NewFileName stringValue="${request.command.parameter.newPath}/${request.command.parameter.newFile}"/>
<L7p:RetrieveCommandTypeFromVariable booleanValue="true"/>
</L7p:SshRouteAssertion>
</wsp:All>
</wsp:Policy>
Sincerely,
Stephen Hughes
Director, CA Support