CentOS system implements SSH passwordless login method

  
                

In the CentOS system, you need to log in when you log in to SSH. In fact, as long as you make a simple setup, you can implement SSH without password login. Do you want to know how to set it? Let's learn how CentOS implements SSH passwordless login with Xiaobian.

a, the environment configuration

1, the server: CentOS release 5.3 IP: 222.73.115.198

2, kefuduan: CentOS release 5.8 IP: 192.168. 4.244

Second, configure SSH passwordless login requires 3 steps:

1, generate public and private keys

2, import the public key to the authentication file, change the permissions < Br>

3, test

Third, client configuration

1, generate private and public keys on the client;

# ssh-keygen

[root@jw02 ~]# ssh-keygen

Generating public/private rsa key pair.

Enter file in which to save the key (/root/.ssh/id_rsa) : #回车(代表上登录No password)

Enter passphrase (empty for no passphrase): #回车

Enter same passphrase again: #回车

Your identification Has been saved in /root/.ssh/id_rsa. #代表私钥

Your public key has been saved in /root/.ssh/id_rsa.pub. #代表公键

The Key fingerprin t is:

04:45:0b:47:10:92:0c:b2:b9:d7:11:5b:49:05:e4:d9 root@jw02

[ Root@jw02 ~]# ls ~/.ssh/

id_rsa id_rsa.pub known_hosts

2. By default, two files are generated in the ~/.ssh or /root/.ssh/directory:

The public key is: id_rsa.pub

The private key is: id_rsa
Previous12Next page Total 2 pages

Copyright © Windows knowledge All Rights Reserved