I have 3 different applications running in AWS under one AWS account with 3 ec2 instances each which mean I have 9 ec2 instances having 9 java process, how can I kill java process running in multiple ec2 machines remotely?

What I want to do is to run a command from bastion host which can ssh into one machine or all the machines and stop the java process instead of ssh into all machines.

closed as too broad by DavidPostill Jul 13 at 19:55

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.