clusterinthecloud / support

If you need help with Cluster in the Cloud, this is the right place
2 stars 0 forks source link

can't ssh into the master node #7

Closed trnh closed 4 years ago

trnh commented 4 years ago

After the terraform completed and the master node IP address is provided.

When run : ssh cits@xx.xx.xx.xx cits@xx.xx.xx.xx Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

I can see the key pair : ec2-user-true-yeti is created , but there is no private key for me to download, not sure how i can login without a private key.

Also how i can customize which key_pair the cluster should use, let's say reuse my existing key_pair.

Thank you.

milliams commented 4 years ago

Hi, there's a few things here. Firstly, the username to log in as is citc, not cits. Secondly, on AWS (since it is new), I think the documentation may be slightly wrong on one point. When logging in for the first time, you will likely need to do:

ssh -i ~/.ssh/aws-key citc@x.x.x.x

i.e. specify the passphrase-less key-pair you created in the setup. If this lets you log in then you can add your usual public key to /home/citc/.ssh/authorized_keys after which you should be able to log in with ssh citc@x.x.x.x.

If this works for you then I will add a feature to CitC to do this process automatically, i.e. allow you to specify which public keys you want added to the citc user.

trnh commented 4 years ago

Hi milliams,

Thank you for your response. I just tested it . It worked.

ssh -i ~/.ssh/aws-key citc@x.x.x.x

In the document.

"The final step of setup needed is to create a key which Terraform will use to communicate with the server to upload some configuration. For now this must be created with no passphrase: "

$ ssh-keygen -t rsa -f ~/.ssh/aws-key -N ""

This step only mentioned the key for Terraform to communicate but doesn't mention that this is a private key to use for SSH into the master node.

milliams commented 4 years ago

Yes you're right, the documentation is not clear on this point. Thanks for reporting the problem and that it is working now. I'm working to update the docs and the code to make this easier.

trnh commented 4 years ago

hi Matt, Thank you.

I updated the doc on github. I will keep working and testing the cluster. I will let you know what i found and happy to give feedbacks.