Wednesday, December 3, 2014

SETTING SSH CONNECTION WITHOUT PASSWORD

Do step by step below :
  1. From Source Server
  • Login as OS user that will be use for SSH without password
  • At user home directory, go to directory "ssh" : cd .ssh
  • Run command : ssh-keygen -t dsa. This command will be generate file id_dsa.pub

  1. Copy file id_dsa.pub to Target Server (Notes : usually OS user in Target and Source is same)
  • Run command : scp id_dsa.pub server_target:/home_user/.ssh/
  • Fill in user password at Target Server

  1. Create authorized key at Target Server
  • Login as user at Target Server
  • At user home directory, go to directory "ssh" : cd .ssh
  • Run command : ls –al and make sure id_dsa.pub file available
  • Run command : cat id_dsa.pub >> authorized_keys2

  1. At Source Server
  • Login as previous OS user that will be use for SSH without password
  • Run command : ssh server_target and make sure that SSH connection will not prompt password.

Please try and good luck :) :) :)

No comments:

Post a Comment