We know that most of the Linux system operations are implemented by commands. If you want to upload or download files remotely, you can choose to use the scp command. Explain the way Linux uses the scp command to upload and download files remotely. Friends who don't know can learn about it.
command: scp
Copy files between different Linux There are three common methods:
is a first ftp, wherein is mounted a Linux Ftp server, so you can use another ftp client program to copy the file.
The second method is to use the samba service, similar to the way Windows file copy operation, more concise and convenient.
The third is to use the scp command to copy files.
scp is a file copy with Security, based on ssh login. It is more convenient to operate. For example, to copy the current file to another remote host, you can use the following command.
scp /home/daisy/full.tar.gz [email protected]:/home/root
Then you will be prompted to enter the login of the root user of the other 172.19.2.75 host. Password, then start copying.
If you want to reverse the operation, copying the file from the remote host to the current system is also very simple.
scp root@/full.tar.gz 172.19.2.75:/home/root/full.tar.gz home/daisy/full.tar.gz
linux's scp command can be Copy files and directories between linux;
Examples
scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option ] [-P port] [-S program] [[user@]host1:]file1 . . [[user@]host2:]file2
DESCRIPTION :scp copies files between hosts on a network.
Transfer files using scp
1. Download files from the server < Br>
scp username@servername:/path/filename /tmp/local_destination
For example, scp [email protected]:/home/kimi/test.txt put /home/kimi on 192.168.0.101 Download the file /test.txt
to /tmp/local_destination
2. Upload the local file to the server
scp /path/local_filename username@servername:/path
For example, scp /var/www/test.php [email protected]:/var/www/Upload the test.php file
in the /var/www/directory of this machine to 192.168. 0.101 in the /var/www/directory on this server
3. Download the entire directory from the server
scp -r username@servername:remote_dir//tmp/local_dir
For example: scp -r [email protected] /home/kimi/test /tmp/local_dir
4, upload directory to server
scp -r /tmp/local _dir username@servername:remote_dir
For example:
scp -r test [email protected]:/var/www/Upload the test directory in the current directory to /var/www on the server /directory
The above is the way to achieve remote upload and download files through the scp command. In addition to the scp command, you can also upload and download files remotely through the tool.
In the Linuxp system, the itables command can perform a backup or restore for us, b
gmtime and localtime are two different functions. Many people are confused when usi
The Linux pwd command is mainly used to print the working path of the current working directory. If
IPv6 is what we usually call the Internet protocol. It is the core protocol of TCP/
How to use ext3grep to recover files on Linux
Knowledge about file I/O operations under Linux
Linux php-cgi accounted for 100% of the memory solution
Linux using virtual machine to install Windows 10
Techniques for installing source software under Linux system
How to install and set up Puppet in CentOS 5.5
How to configure Tmux in Linux system?
Summary of problems often encountered when using Linux for the first time
Linux system settings DB2 and other services boot process
What should I do if the NIC cannot be started after the Linux virtual machine is cloned?
Linux system iptables error iptables: Protocol wrong how to do?
Several tips for strengthening the security of Linux systems
How to use the SkyDrive network disk in Win8.1?
Redis several misunderstandings
Teach you how to find self-starting program skills
Win10 system computer installed QQ after a lot of software is going on
Windows accelerates the update and brings people what to bring
What if Win10 IE cannot display pictures?
Win7 system desktop has no icon, only the status bar is going on
Invalid switch error solution when Ghost backs up Win7