Lesson 13

Date: 4/23/2014
High Performance Computing (part II)
Linux for Engineering and IT applications


SSH host based authentication

Exercise

  • Start clmaster VM and login to its console as user hostadm:
    virsh start clmaster
    virsh console clmaster 
    

  • On clmaster VM, in the /etc/ssh/ssh_config file set, add the following two lines on the bottom:
    
    HostbasedAuthentication yes
    EnableSSHKeysign yes
    

  • Start clnode01 in the other command window on your desktop and login to its console as user hostadm:
    virsh start clnode01
    virsh console clnode01
    

  • On clnode01 VM, add the same two lines into /etc/ssh/ssh_config:
    
    HostbasedAuthentication yes
    EnableSSHKeysign yes
    

  • On clnode01 VM, make the following changes in config file /etc/ssh/sshd_config:
    
    HostbasedAuthentication yes
    IgnoreRhosts no
    
    Make sure the above lines are uncommented.
  • On clnode01, create file /etc/hosts.equiv, containing the following lines:
    clmaster
    clnode01
    clnode02
    
  • On clnode01, create file /etc/ssh/ssh_known_hosts containing clmaster's public key:
    sudo -s
    scp hostadm@clmaster:/etc/ssh/ssh_host_rsa_key.pub  /etc/ssh/ssh_known_hosts
    
    Edit /etc/ssh/ssh_known_hosts file and type "clmaster" in the beginning of the line as shown below:
    clmaster ssh-rsa AAAAB3Nza ...
    

  • Restart SSH service on clnode01
    service ssh restart
    

  • On clmaster, try to SSH to clnode01 as user hostadm. clnode01 should allow SSH login without password if all the steps above were done correctly.


  • Take me to the Course Website