Kamis, 05 Juli 2018

How to setting SSH keyless linux system Centos

  Tidak ada komentar
Some time as sysadmin we need to setup the host to login using ssh without typing password
Step 1: Generate RSA key
Generate RSA public and private key by running following command line
[[email protected] ~]$ ssh-keygen -t rsa
Step 2: Create .ssh directory on target machine
Create .ssh directory by running following command line
[[email protected] ~]$  ssh [email protected] mkdir -p .ssh
Step 3: Copy the client public key to target machine
Create .ssh directory by running following command line
[[email protected] ~]$ cat .ssh/id_rsa.pub | ssh [email protected] 'cat >> .ssh/authorized_keys'
Change directory and file privileges
[[email protected] ~]$ ssh [email protected] "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"
you can enter to target machine via ssh without password now

Tidak ada komentar :

Posting Komentar