Site Commands In Rebex SFTP

0 votes
asked Oct 13, 2013 by Sree (120 points)
edited Oct 15, 2013

Hi,

We are using Rebex SFTP in SSIS 2005 to transfer the files. I could find the site method to mention the SITE commands RECFM=VB LRECL=3004 in Rebex FTP .But i could not find such method for Rebex SFTP.I tried to SFTP the file without mentioning the site commands but my client received the file as unformatted. And they asked us to mention the RECFM=VB LRECL=3004 site commands.

Can u pls tell me how to achieve it in REBEX SFTP.

Thanks,

Applies to: Rebex SFTP

2 Answers

0 votes
answered Oct 14, 2013 by Tomas Knopp (58,890 points)
edited Oct 15, 2013

Hello,

actually there is no SITE command present in the SFTP protocol.

Did you not mean Rebex FTP over SSL? Please check on this article about difference between Rebex SFTP and Rebex FTP/SSL protocols. These two protocols sometimes get confused.

However, if you really need SFTP protocol, it is possible to execute remote commands with Rebex SFTP as described in this article.

commented Oct 15, 2013 by Sree (120 points)
edited Oct 15, 2013

Hi,

Thanks for ur reply.

Yep we are using SFTP protocol to transfer the file. I have used the following code, but no luck.Still the files are received as unformatted on mainframe side

Dim channel As Rebex.Net.SshChannel = sftpx.Session.OpenSession()
channel.RequestExec("ls /+lrecl=3004,recfm =VB")
sftpx.PutFile(SourceFilePAth, RemotePath)
channel.Close()

Thanks

commented Oct 15, 2013 by Tomas Knopp (58,890 points)
edited Oct 15, 2013

Please see my answer below.

0 votes
answered Oct 15, 2013 by Tomas Knopp (58,890 points)
edited Oct 15, 2013

Hello,

if you were told to issue SITE command, it definitely means you have to switch to FTP protocol. There is no SITE command in the SFTP protocol and executing the remote command via SSH channel will not simulate the FTP SITE command. Sorry! So please download Rebex FTP/SSL trial and give it a try.

...