Linux CLI 34 ๐ง scp and sftp commands
a - scp command
scp (secure copy) is used to copy files between different Linux systems
This happens securely and over SSH
syntax โ scp [options] source_file destination_path
example 1 โ copies the text.txt from local system to remote with 192.168.1.10 IP address and at /home/user location
example 2 โ copies the text.txt from remote system with 192.168.1.10 IP address and at /home/user location to the local system
common options: -r โ Recursive copy of a directory tree -v โ Verbose mode
-P port โ Specify the port number to be used -C โ Compression option (uses zlib or bzip2 compression algorithm)
-l limit โ Sets a bandwidth limit in bytes/sec for the transfer -q โ quiet mode
b - sftp command
sftp (secure file transfer protocol) is used to transfer files between remote systems
This also happens securely and over SSH.
It is similar to FTP but uses encryption and authentication.
syntax โ sftp [options] [user@]host[:directory]
example 3 โ connects to 192.168.1.10 with user kronos
commands: rmdir dirname โ deletes the dirname directory mkdir dirname โ creates a directory with name dirname
rm filename โ delete a file get filename /home/kronos โ downloads a file to local location
put file /remote/location โ uploads a file to the remote system man sftp โ to see all the options and available commands
Stop using slow, ad-bloated tool sites! ๐คฎ
๐ Search “KandZ Tools” on Google to use many professional utilities for free.
KandZ.me is the ultimate minimalist hub for:
โ
Finance (Mortgage, Interest, Inflation)
โ
Tech (Base64, JSON, Dev Suite, IP)
โ
Health (BMI, BMR, TDEE)
โ
Productivity (Timer, Workspace, QR)
โก๏ธ Fast & Private
๐ No data leaves your device
๐ 100% Free
๐ Use it now: https://tools.kandz.me
๐ Bookmark itโyouโll need it later!