sftp Command: Connecting, Transferring Files with put and get, and Using Batch Mode
The sftp command is OpenSSH's file transfer program for exchanging files with a server connected over SSH; after connecting, you move between remote folders at the sftp> prompt, uploading with put and fetching with get. On an AlmaLinux 9 test server, connecting with key authentication, exchanging files and folders, and also running a -b batch file showed that a file with the same name was overwritten without asking and that a batch stopped on the spot when a command in the middle failed, ending with exit code 1…