The QUOTE SITE sequence is used in FTP and FTP/SSL clients for sending commands to the server. I don't recall any SFTP server which uses them. Are you sure that you are using the SFTP?
For differences between SFTP, FTPS, FTP and FTP/SSL see www.rebex.net/kb/secure-ftp
Using QUOTE command in FTP/SSL
Following code demonstrates how to use SITE command using Rebex FTP:
// create client and connect
Ftp client = new Ftp();
client.Connect("ftp.example.org");
client.Login("username", "password");
// send SITE command
// note that QUOTE and SITE are ommited. QUOTE is command line ftp syntax only.
client.Site("RECFM=FB LRECL=100 BLOCKSIZE=27900");
// disconnect
client.Disconnect();
Sending commands via SSH/SFTP
If you are using SFTP client you can achieve similar functionality by using ssh RunCommand
from Rebex Terminal Emulation component. You can connect using SFTP and then reuse the session for sending the command.
// establish the shared SSH connection
var session = new Rebex.Net.SshSession();
session.Connect(hostname);
session.Authenticate(username, password);
// bind an SFTP client to the SSH session
Sftp sftp = new Sftp();
sftp.Bind(session);
// bind an SSH client to the SSH session
Ssh ssh = new Ssh();
ssh.Bind(session);
// execute a simple command
string response = ssh.RunCommand("echo Hello world!");
session.Disconnect();
More info: