How do I copy a file under two Linux system servers? Always use this named SCP (security copy).Do not know the reason for this command, and then do a summary:We all know that CP command is used as CP [source file address (i.e. to copy file location)] [Destination address (where to copy files to)]Example: Cp-r./sample/testThe use of the
]_ip:remote_folder
Or
SCP Local_file [Email protected]_ip:remote_file
Or
SCP Local_file Remote_ip:remote_folder
Or
SCP Local_file Remote_ip:remote_file
1th, 2 Specify the user name, the command executes after the user password is entered, the 1th
commands for file replication.SCP is a file copy with security, SSH-based login. Easy to operate, for example, to copy the current file to a remote other host, you can command the following.scp/home/daisy/full.tar.gz [Email Protected]:/home/rootYou will then be prompted to enter the login password for the root user of the other 172.19.2.75 host, and then copy is started.It is also easy to copy files from t
commands for file replication.SCP is a file copy with security, SSH-based login. Easy to operate, for example, to copy the current file to a remote other host, you can command the following.scp/home/daisy/full.tar.gz [Email Protected]:/home/rootYou will then be prompted to enter the login password for the root user of the other 172.19.2.75 host, and then copy is started.It is also easy to copy files from t
In general, the copy command prompts us to enter the username and password for the remote server, which is an obstacle in automating the program because there is no manual intervention. About the server between the exchange of the password does not need to be introduced before, you can refer to the previous article. Here is an introduction to the
Remote backup large capacity often there is the case that the file from remote backup is very large, it takes a long time, you want to exit SSH after the program can still continue to download in the background, can be established through the establishment of inter-server security information relationship and nohup way to solve.There are two servers: a server IP 192.168.3.100, b server IP 121.41.111.46.I. Establish a secure trust relationship certificate between servers1. Generate key pairing on
When executing scp in a script, you can automatically enter the password in Perl or other scripts, and the script will be interrupted. How can I avoid being interrupted? SCP can automatically enter the password and the script runs smoothly? I used an sshpass tool. 1.: http://sourceforge.net/projects/sshpass/ 2. install
-keygen-b 1024-t RSAOn server BThe first step is to enter/HOME/LINUXIDC CD/HOME/LINUXIDC (because we are using LINUXIDC user, if we use other users, we need to go to other user's directory, such as Cd/home/weblogic)The second section, create the. SSH directory, mkdir. SSHPart III, enter the. SSH directory, CD. SSHFourth, create a new file Authorized_keys, Touch Authorized_keysOn server AFifth step, execute scp-p. ssh/id_rsa.pub [Email Protected]:/home
1. Order: SCPThere are 3 common ways to copy files between different Linux:The first is FTP, which is one of the Linux installation FTP Server, so you can use an FTP client program to copy files.The second method is to use Samba services, similar to the Windows file copy method to operate, relatively simple and convenient.The third is the use of SCP commands for file replication.2. Command format:
First, execute the Command Script on each node.
Mkdir-p ~ /. Ssh
Chmod 700 ~ /. Ssh
/Usr/bin/ssh-keygen-t rsa
Then on the host that needs to be distributed in batches
Touch ~ /. Ssh/authorized_keys
Ssh 192.168.1.20 cat ~ /. Ssh/id_rsa.pub> ~ /. Ssh/authorized_keys
Note: 192.168.1.20 is the IP address of the distribution host.
The authenticity of host linux1 (192.168.1.100) cant be established.
RSA key fingerprint is 2f: cc: a1: 4f: 2b: 67: 01: 6a
SCP is the most powerful file transfer command in Linux, enabling easy file transfer operations from local to remote and remote to local. The following is a brief explanation of the operation of the SCP command, for some useful reference:The first is the local to remote operation: The format of the operation is as foll
Due to the need to remotely transfer the file a server to the B server but the SCP command to manually enter the password each time so that the script execution is too cumbersome, so that a server and B server Trust can be, the specific operation is as follows:First in a server configuration: mkdir-p ~/.ssh chmod ~/
Scp commands remotely and locally copy each other. scp provides secure file copy, which is based on ssh logon. For example, to copy the current file to another remote host, you can run the following command. 1scp/home/test/test.txt root@192.168.1.5:/home/root then you will be prompted to enter another host 192.168.1.5 root user login
SSH Remote connection command:Usage format:ssh ipaddr does not specify the user to log on to the remote host as the user of the current host login systemssh [email protected] telnet to a host as a user via SSH protocolusage:ssh [email protected] Telnet to the 192.168.1.100 host via the SSH protocol as rootssh-l USERNAME ipaddr equivalent to ssh [email protected] login mode SSH [email protected] ' commond ' to username the user to execute Commond command
In the test, you need to pass the files between the two virtual machines, the first thought is the SCP command, the results prompt:-bash:scp:command not foundTake it for granted with the Yum Install SCP command, the result is:No Package SCP available.Later found
the files on the remote server
Scp-p 2223 root@10.23.185.16:/root/test.tar.gz/home/test.tar.gz
The uppercase P in the command is the port parameter, 2223 is the port of SSH, and if it is 22, you may not need this parameter, if it is a different port, you must fill it out.Root@10.23.185.16 means to log on to a remote server using root user 10.23.185.16:/root/test.tar.gz represents the files and paths on t
replication.
The SCP is a security file copy, based on SSH login. Easy to operate, such as to the current one file copy to a remote other host, you can command the following.
Copy Code code as follows:
Scp/home/daisy/full.tar.gz Root@172.19.2.75:/home/root
You will then be prompted to enter the login
The SCP is secure copy, a command that is used to remotely copy files under a Linux system. The CP command is similar to it, but the CP is only copied on the local computer and not across the server, and the SCP transport is encrypted.Cp-is mainly used on the same computer, in different directories between the copy fil
Application of Linux SCP command in detail analysisLinux commands are statistically more than 4,000, and Linux SCP commands are used to copy files and directories between Linux, which details the use of SCP commands and parameters.AD:The Linux SCP commands are used to copy f
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.