Question: how sftp file transfer works?
Answer: SSH File Transfer Protocol (SFTP) is designed as an extension of the SSH2 protocol to provide secure file transfer capability. Both command and data connections are encrypted between the client and the FTP server to allow passwords and other sensitive information to be transferred securely over the network.