Access remote system by using SSH

  • Open a terminal and install ssh

# apt-get install openssh -y
or
# yum install ssh* -y

  • Now, we connect the another system before we know the ip address, username and password.
  • e.g.
    Username – splunk
    IP – 192.168.1.4
    Password – ***********
  • Now we connect the system
    #ssh splunk@192.168.1.4
    ssh splunk@192.168.1.4 passwd:***********
  • Now we got the remote system

 

Access remote system without asking the password through ssh-keygen

  • Generate the keygen

#ssh-keygen

  • Put 3 times Enter

1st enter for save the key
2nd enter for passphrase
3rd enter for passphrase again

  • Generate the random image
  • Create id_rsa.pub file for public key location

#cat /root/.ssh/id_rsa.pub

  • For copy the public key to remote machine

#ssh-copy-id splunk@192.168.1.4
And put the remote machine password for adding the key

  • Now we try to login the remote machine without password
    #ssh splunk@192.168.1.4
  • Now we got the remote machine without password
Please follow and like us: