rks rks - 1 year ago 58
Linux Question

what is alternative for SITE command of ftp in sftp

I am trying to connect to a mainframe from linux server using

command and execute a SITE command and transfer file to mainframe, but it is failing and showing Invalid command.

I am using batch operation mode as
sftp -b $batch_file user@remote_user

Answer Source

There is no equivalent of FTP's SITE command in SFTP. SFTP uses a binary format for its protocol messages, and uses specific request numbers (or IDs) to indicate the desired operation. And SFTP does not define any request number/ID for "execute this string as a command". SSH can be used for that sort of thing, but not SFTP.