I have a host system with two systems on it (HP Nonstop). With Python ftplib I can use
ftp = FTP()
ftp.encoding = encoding
ftp.connect(host_addr, ftp_port)
ftp.sendcmd('guardian')
to use the Guardian system paths ($X.PATH.FILENAME) or use
ftp = FTP()
ftp.encoding = encoding
ftp.connect(host_addr, ftp_port)
ftp.sendcmd('oss')
to use the OSS system paths (unix like)
For SFTP I use Paramiko. But I cannot use the guardian paths because I cannot find a command like sendcmd.
transport = paramiko.Transport((host_addr, ssh_port))
sftp = paramiko.SFTPClient.from_transport(transport)
SFTP protocol is binary. It is not a textual protocol like FTP. You cannot use SFTP to send proprietary textual commands to server. The server might implement a proprietary binary request. But that's not common.
You first have to find out what (if any) API does your SFTP server have to achieve the functionality of its FTP
osscommand. It won't be anything likesendcmdfor sure. A common hack that some proprietary SFTP servers use is that you first need to attempt to access/list a virtual path with a command-like syntax that switches the server to the desired state.