Nbsp; first, run the command script mkdir-p ~ on each node ~ /. Sshchmod700 ~ /. Ssh/usr/bin/ssh-keygen-trsa and then touch ~ /. Ssh/authorized_keysssh192.168.1.20cat ~ /. Ssh/id_rsa.pub gt;
First, execute the command script on each node.Mkdir-p ~ /. SshChmod 700 ~ /. Ssh/Usr/bin/ssh-keygen-t rsaThen on the host that needs to be distributed in batchesTouch ~ /. Ssh/authorized_keysSsh 192.168.1.20 cat ~ /.
The scp Local Area Network Copy command First installs the ssh service sudo apt-get install ssh common transmission file. You can use the scp command to copy local files to the target machine: scp file name username @ target machine IP Address: press enter on the target mach
Using 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. fix: Packages provided by the above must not be called SCP in ge
:07Rocrocket pts/0 2009-01-08 11:23 (: 0.0)Rocrocket pts/1 2009-01-08 14:15 (: 0.0)1. If we want to extract the 3rd byte of each row, that's it.W.H.O. | Cut-b 32. If you extract the third character of each lineW.H.O. | Cut-c 33. Remove the last point as shown below10.32.204.22.Cut-d "." 1,2,3,4The MV command is used to rename a file or directory, or to move a file or directory into another location.Parameters:-I: Ask if you want to overwrite-F: Forced
write it in front.There are times when I always have a fear of my life. For example now, always overwhelmed, always inferiority, always pessimistic.The only thing that calms me down is the thought of a man who is always a 100,000-minute-focused quiet sitting in the third row of the 5 teaching-study class 109, drawing the manuscript of mechanical drawing, I've always been so focused, whether it's ice or snow or the heat. A person in an empty self-study classroom focus on everything I want to do w
, in order to meet this requirement, I made some changes in the original script.
Manual Down Data script:
The code is as follows
Copy Code
#!/usr/bin/expect-fSet Timeout-1Set passwd passwdSpawn ssh-p18330 root@72.11.x.xExpect {"Yes/no" {send "YESR"; Exp_continue}"Password:" {send "$PASSWDR"}}Expect "*#*" {send "Sh/root/soft_shell/copy_newfile.shr"}Spawn Scp-r-p18330 root@72.11.
SFTP Introduction
SFTP is a secure File Transfer protocol abbreviation for security FTP. You can provide a secure encryption method for transferring files. SFTP and FTP have almost the same syntax and functionality
Introduction to SCP
Transfer files between two hosts generally use the SCP command, usually using the SCP
$ chmod ~/.ssh/authorized_keysHowever, there is a simpler way, do not need to modify the permissions on the Host B, and directly import the public key content on the remote host, using the Ssh-copy-id command, as follows:$ ssh-copy-id -i/root/.ssh/id_rsa [email protected],xxx,xxx,xxxAfter configuring key, you need to turn on key authentication in the Sshd_config file. $ vim/etc/ssh/sshd_config pubkeyauthentication Yes //Change the item to
Often in the Linux between the SCP command transmission files, each time the need to enter the other machine password, very troublesome. This approach allows both parties to automatically pass the key authentication without having to enter the password manually:
1,root Landing, on both sides of the machine execute the
An order to explainName: CPUsage rights: All usersHow to use:CP [Options] Source DestCP [options] source ... directoryCommand parameters:-A as far as possible file status, permissions and other information are reproduced as original.-R If the source contains a directory name, the files under the directory are also copied to the destination.-F If a destination already has a file with the same file name, it should be deleted before copying.==========================================================
In the test, files must be transferred between two virtual machines. The SCP command is first generated, and the result is as follows: -Bash: SCP: Command not found If you use the yum install SCP command for installation, the re
Linux's SCP commands allow you to copy files and directories between Linux;==================SCP command==================The SCP can replicate files between 2 Linux hosts;Command basic format:SCP [Optional parameters] File_source File_target
Briefly describe the method:
First, run the command ssh-keygen-t sra \ on the local machine to generate the RSA key.
(This command generates a key pair: id_rsa and id_rsa.pub. They are saved in ~ by default ~ /. Ssh/directory. You can change id_rsa.pub to local_rsa.pub to avoid the same name as id_rsa.pub on the remote host. During the generation process, pass phrase is required. This is used to protect t
Copy your local host user's SSH public key file to the remote host user's ~/.ssh/authorized_keys file, assuming the local host Linux (10.1.1.1), remote host Linux (10.1.1.2)One, the user in the LINUX100 hostRun#ssh-keygen-t RSAThe results are as followsGenerating public/private RSA key pair.Enter file in which to save the key (/HOME/.USERNAME/SSH/ID_RSA): #回车Enter passphrase (empty for no passphrase): #回车Enter same passphrase again: #回车Your identification has been saved In/home/.username/.ssh/id
First, copy the native files to the remote server#scp/home/administrator/news.txt [email protected]:/etc/squid/home/administrator/absolute path to local filesNews.txt The local file to be copied to the serverRoot logs on to the remote server through the root user (you can also use other users with equal privileges)192.168.6.129 the IP address of the remote server (you can also use a domain name or machine name)/etc/squid copying local files to a path
Transferred from: http://os.51cto.com/art/201003/187301.htmThe Linux SCP commands are used to copy files and directories between Linux, and how to use them here, from local replication to remote, remote replication to local, is two ways to use it. Here are specific examples:==================Linux SCP Command==================
the client's point of view, the server may be counterfeit; from the service side, there may be a brute force password.650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px ;p adding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" clip_image012 "border=" 0 "alt=" clip_ image012 "src=" http://s3.51cto.com/wyfs02/M00/75/87/wKiom1Y7OwzzQEcFAAFaxsWoz6E668.jpg "height=" 314 "/>
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 the rem
Most of the Linux replication our delivery tools use, have FTP,SCP wait a moment.The SCP command is easy and quick,Native to Remote: SCP (-R) local directory or file path remote IP: directoryRemote to Native: SCP (-R) Remote IP: directory local file or directory pathNote tha
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 the remote server
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.