sftp command line linux
# Connexion to default port 22
sftp your_user@your_server_ip_or_remote_hostname
sftp> ? # help
# SFTP get local directory
sftp> lpwd
sftp> lls # list of files in local directory
sftp> lcd mydir # change local directory
# SFTP get remote directory
sftp> pwd
sftp> ls # list of files in remote directory
sftp> cd mydir # change remote directory
# put single file from local to remote directory
sftp> put myfile
# put multiple files from local to remote directory
sftp> mput *.txt
# get single file from remote to local directory
sftp> get myfile
# put multiple files from remote to local directory
sftp> mget *.txt
5
52
#################################
SFTP Command Line Syntax Commands
#################################
# Connexion to default port 22
sftp your_user@your_server_ip_or_remote_hostname
# If default port 22 use the -P option to specify the SFTP port
sftp -P custom_port remote_username@server_ip_or_hostname
# help
sftp> ?
# SFTP get local directory
sftp> lpwd
# list of files in local directory
sftp> lls
# change local directory
sftp> lcd mydir
# SFTP get remote directory
sftp> pwd
# list of files in remote directory
sftp> ls
# change remote directory
sftp> cd mydir
# put single file from local to remote directory
sftp> put myfile
# put multiple files from local to remote directory
sftp> mput *.txt
# get single file from remote to local directory
sftp> get myfile
# put multiple files from remote to local directory
sftp> mget *.txt
Thank you!
52
0
Are there any code examples left?
New code examples in category Shell/Bash