4

I've been trying to access some ec2 instances we have using the clusterssh in ubuntu, but it seems not possible.

Is it possible to use cssh with the keyfile?

Does anybody know a way to connect via ssh to multiple EC2 instances using the pem file and replicate commands in all of them?

I tried add the path to the file in the instance address but it didn't work.

dtj
  • 281
  • 1
  • 4
  • 15
  • There's many reasons you can get this error. To find out, best add the verbose flag to you ssh command. You'll find the most common AWS EC2 reasons on this question: http://stackoverflow.com/questions/18551556/permission-denied-publickey-when-ssh-access-to-amazon-ec2-instance/18552866#18552866 – Thibault D. Sep 17 '15 at 08:43
  • Welcome to StackOverflow by the way, please note that this isn't a forum, this is a Q/A so you should search for similar questions before asking a new one. – Thibault D. Sep 17 '15 at 08:45
  • Thanks, sorry, but I didn't specify my question, I am able to access the instances with SSH, but I can't access using clusterssh. I tried to search but I didn't find any info. – dtj Sep 17 '15 at 13:37
  • Never used clustered ssh but I think same thing goes there: Use verbose flag and post the log output. – Thibault D. Sep 17 '15 at 13:40
  • I found a solution, just uncomment some lines at the config file: ssh_args= -i set the instances nickname to node1 = user@host and use the command cssh node1 node2 ... Should I delete my question? – dtj Sep 17 '15 at 14:33
  • No, you should answer it and validate you own answer :) – Thibault D. Sep 18 '15 at 06:17

1 Answers1

3

I found a solution, just uncomment some lines at the config file and write the path to the pem file:

ssh_args= -i <path to pem file>

set the instances nickname to

node1 = user@host

and use the command cssh node1 node2

dtj
  • 281
  • 1
  • 4
  • 15