← Back to Index | ← Previous: Day 6
Objective
The system admins team of xFusionCorp Industries has set up some scripts on jump host that run on regular intervals and perform operations on all app servers in Stratos Datacenter. To make these scripts work properly we need to make sure the thor user on jump host has password-less SSH access to all app servers through their respective sudo users (i.e tony for app server 1). Based on the requirements, perform the following:
- Set up a password-less authentication from user
thoron jump host to all app servers through their respective sudo users.
Steps
- Generate SSH Key Pair for
thoronjump-hostssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa -N "" # -N "" means no passphrase (required for password-less auth) - Copy SSH Public Key to Each App Server
Use
ssh-copy-idwith each server’s sudo user. You’ll be prompted for the user’s password once:ssh-copy-id tony@stapp01 ssh-copy-id steve@stapp02 ssh-copy-id banner@stapp03 - Verify Password-less SSH Works
ssh tony@stapp01 "echo 'App1 OK' && hostname"