Wednesday, 3 August 2011

SSH key setup

Generate the ssh Key for password free access to specific IDs

  Ex: Source server : server1
       Destination Server : server2
      User ID : test1 test2
plan: test1 id login from server1 to server2  using test2 id

server1:> login as test1
server1:/home/test1:>
server1:/home/test1:>mkdir .ssh2
server1:/home/test1:>cd .ssh2

server1:/home/test1/.ssh2:>/usr/local/bin/ssh-keygen2      <DSA Key>
don't provide any phrases type enter
it creates file names as below
server1:/home/test1/.ssh2:>ls
id_dsa_2048_a.pub
id_dsa_2048_a
server1:/home/test1/.ssh2:> ssh-keygen-g3 -t rsa -b 2048 -P <RSA KEY>
server1:/home/test1/.ssh2:>ls
id_rsa_2048_a
id_rsa_2048_a.pub

move the above .pub files to ~test2/.ssh2 at server2 location.
then try now you will get access from server1 to server2 without password

No comments:

Post a Comment