Often scp copy files between different linux machines, always have to enter a password to be feasible.
Generate a public key through ssh-keygen and establish a trust channel between the two machines.
Suppose the local machine client, the remote machine is the server.
1. Generate rsa keygen
[winter@client winter] $ ssh-keygen -b 1024 -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/winter/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again: < Br>
Your identification has been saved in /home/winter/.ssh/id_rsa.
Your public key has been saved in /home/winter/.ssh/id_rsa.pub.
The key fingerprint is:
33:d4:7b:9c:87:04:cf:14:40:22:6d:c7:15:78:97:6a winter@client
Directly enter the address of the public key and private key directly, and the private key password can be directly returned or entered.
2. View multiple private and public key files in the .ssh directory
[winter@client winter] $ ls .ssh/
id_rsa id_rsa.pub known_hosts< Br>
3. Copy the public key to the target machine and rename it to authorized_keys
[winter@client winter] $ scp .ssh/id_rsa.pub [email protected]:/home/winter/.ssh/authorized_keys
The authenticity of host '192.168.0.110(192.168.0.110)' can't be established.
RSA key fingerprint is 5b:78:e8:e9:dc: D8:db:bd:f7:66:44:e6:3b:ce:f2:79.
Are you sure you want to continue connecting (yes/no)? yes
Warning : Permanently added '192.168.0.110' (RSA) to the list of known hosts.
[email protected]'s password:
id_rsa.pub 100% 221 1.2MB/s 00 :00
When you first use the scp command, you will be prompted to enter your password, and if you want to continue the link,
4. Test ssh into
[winter@client winter] $ ssh 192.168.0.110
5. Ok, get it!< Br>
[winter@server winter] # it's ok!
Environment: REDHAT 51. Check if VNC is installed: rpm -qa vnc-server vnc-server-4.1.2-9.el5
Command Introduction Shutdown, poweroff, reboot, halt, init can be shut down, approximate
Preparation before installation 1. kail linux 2.0 download (multiple versions of ISO) Downl
If you want to try a desktop system other than Mac and Windows, Linux should definitely be y
Vim tools commonly used in Linux
Summary of Techniques for Copying Files Between Linux Systems
Ubuntu update kernel switch kernel boot
Linux installation JDK for Linux system
Simple and easy to use calculator bc
Linux virtual machine three networking modes and remote login management
Under Linux, how can ordinary users temporarily obtain root privileges?
The difference between buffer and cache in linux free command
What should I do if the win8 start menu font becomes a box garbled?
XP death countdown, Microsoft Win8.1 computer big discount
Close the "Resolve PC Problems" prompt in the lower right corner of the Win7 system
How does Linux use tools to encrypt data?
APACHE supports .htaccess method
Windows7 can not install software error prompt Error 1935 solution
Display the store app on the Win8.1 system tray
How to use the Windows XP Regsvr32 command to fix the system fault
How does Win8 system set up files to try to synchronize with one click?
Buy with caution! Win10 Pro insider preview Chinese Professional Edition license price 7.99 yuan