Secure File Transfer Protocol (SFTP)
Secure File Transfer Protocol is a network protocol for securely accessing, transferring and managing large files and sensitive data.
How to use SFTP
open a command line terminal
type sftp "username@hostname"
Example:
sftp 407939ef5a69@407939ef5a.09417.alxcode
sftp commands
ls - lists the files in the remote directory
lls - lists the files in your local machine
pwd - prints the remote server working directory
lpwd - prints the local working directory
cd - changes the remote working directory
lcd - changes directory in your local machine
mkdir - to create a directory on the remote server
lmkdir - to create a directory on the local machine
bye - to end the sftp prompt
put - put is used to upload files from the local machine to the remote server
put filename
- mput - mput is used to upload multiple files from the local machine to the remote server
Example: upload all files that end with .txt from the local machine to the remote server
mput *.txt
get - get is used to download files from the remote server to the local machine
get filename
mget - mget is used to download multiple files from the remote server to the local machine
Example: download all files that end with .txt from the remote server to local machine
mget *.txt