Copy the ssh public key file of your local host user to the ~/.ssh/authorized_keys file of the remote host user, assuming the local host linux (10.1.1.1), remote host linux (10.1.1.2)
First, the user in the linux100 host
Run
#ssh-keygen -t rsa
Results
Generating public/private rsa key pair.
Enter file in which to save the key (/home/.username/ssh/id_rsa):#Enter
Enter passphrase (empty for no passphrase):#Enter
Enter same passphrase again:#Enter
Your identification has Been saved in /home/.username /.ssh/id_rsa.
Your public key has been saved in /home/.username /.ssh/id_rsa.pub.
< BR>The key fingerprint is:
38:25:c1:4d:5d:d3:89:bb:46:67:bf:52:af:c3:17:0c username@localhost
Generating RSA keys:
Key generation complete.
Two files will be generated in the user directory ~/.ssh/, id_rsa , id_rsa.pub
Second, put linux (10.1.1.1) on the host The id_rsa.pub file is copied to the .ssh directory under the root user directory of the linux (10.1.1.2) host, and renamed to authorized_keys
:
/Root/.ssh/authorized_keys
This will copy the file to linux (10.1.1.2) on the linux100 host and will not prompt for the password, directly copied. vice versa!
Three, copy file or directory command:
Copy files:
(1) Copy local files to remote
scp file [email protected]: remote path
(2)copy files from remote to local
scp -- [email protected]: Filename local path
Copy directory:
(1) Copy local directory to remote
scp -r directory [email protected]: remote path
(2) Copy the directory back to the local remote
scp -r [email protected] .1.2: Directory name local path.
In terms of file system, Linux® can be regarded as the Swiss Army Knife in the operating syste
In recent years, the open source Linux system can be said to be in the limelight, whether it is pers
In Windows, Sogou Pinyin input method has a large number of users because of its large vocabulary an
Linux has created a friendly environment that gives us the possibility to choose. For example, most
The principle of Windows CE cross-process memory injection
The difference between memory buffer and cache in Linux operating system
CentOS 5 Forgot Password Processing Method
Linux vps how to modify the time zone linux vps time zone setting
Arista Networks is a little different
Sublime Text 3 Beta 3019 Features Overview
The shell script automatically modifies the IP information
How to check the current version of the network card under the Linux operating system
Personalized Win2000/XP tasks &
Win10 Wireless Network Management Change Tips
How to encrypt a folder? Folder encryption method
How to use Win7 system ccproxy? How to set up ccproxy and steps
How to improve the security of the FTP server in an all-round way.
Various benefits of including frequently used websites into the Win7 taskbar
Win8 system hides or opens the icon in the lower right corner of the desktop