Home > other >  Suse password-less logins centos (public-key authentication SSH login)
Suse password-less logins centos (public-key authentication SSH login)

Time:10-03

1, first of all, the public and private key generated on suse system for
SSH - keygen2 - trsa

Can't remember where the red box input, directly enter
As can be seen from the above, the generated public key for id_rsa_2048_h. Pub, the private key for id_rsa_2048_h
And then execute the echo "IdKey id_rsa_2048_h & gt;">/root/. An ssh2/identification
2. Then on suse system through the following command to upload the public key to centos SSH server
SCP/root/. An ssh2/id_rsa_2048_h. Pub @ # [ipaddress] [user] [port] :/TMP

Here my centos server SSH listening port number of 36000
3. The public key format conversion
Centos system SSH public key by default certified public key format for openssh, follow PKCS8, SSH and suse system default to public certified public key format for an SSH2, follow RFC4716, so we need to suse transformed from an SSH2 public key system, convert the openssh format
On centos system
CD/TMP to switch to the public upload path

Then transformed using the following command
SSH - the keygen - I - f id_rsa_2048_h. Pub & gt; Id_rsa_centos. Pub

And then adding the public key to a public key certificate authentication file
The cat id_rsa_centos. Pub & gt;>/root/. SSH/authorized_keys
4. Open the centos system SSH service process of public key authentication
Vim/etc/SSH/sshd_config
/etc/SSH/sshd_config is centos SSH service the default configuration file (compile installation configuration file will be a difference

Then save out
Through service SSHD restart restart centos SSH service daemon
5. Verify
SSH remote login centos system on suse system

Password-less public-key authentication login successfully,

CodePudding user response:

  • Related