Shell script for aws ec2 instance

Hello, we have a requirement where we have to ssh to aws ec2 instance, scp cert file, unzip file, merge cert and ca cert and then replace in directory. can this be achieved through shell script and how?

Hi @deepakcupadhyay

Yes, you can run a shell script remotely over ssh.

  1. scp the files across
  2. Use ssh to forward a script that will operate on the files

See https://www.cyberciti.biz/faq/unix-linux-execute-command-using-ssh/