sftp terminal upload file inline

C++
sftp {user}@{host}:{remote_dir} <<< $'put {local_file_path}'
Source

Also in C++: