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 thor on jump host to all app servers through their respective sudo users.
On jump server, run the following command:
ssh-keygen -t rsa -b 2048
It will generate an ssh pub key and private key. We are going to share the pub key to all the app server for respective users.
Login into each app server and run the following command:
mkdir -p .ssh
vi .ssh/authorized_keys
copy id_rsa.pub key from jump host inside /home/thor/.ssh/ and paste it there
#!/bin/sh
ssh-copy-id user@host
It will create .ssh directory for each app server if doesn’t exist then copy paste host key to authorized_keys file.
~/.ssh/id_rsa (private), ~/.ssh/id_rsa.pub (public)ssh-keygen -t rsa -b 4096 (strong RSA key)ssh-copy-id user@host (automated deployment)~/.ssh/authorized_keys700 for .ssh/, 600 for private keys, 644 for public keysssh-agent for passphrase caching