Issue on page /users/launch.html
Hydrag1 opened this issue · 7 comments
Hi,
I'm really new to AWS and Ubuntu in general. I managed to set up an account and also launched it via PUTTY on Win10. Now, if I choose max user it crashes. Hence I have to login via the Ubuntu user as stated in the text. But then, how do I shift my key now?
ssh ubuntu@ -i /path/to/key.pem
sudo cat ~ubuntu/.ssh/authorized_keys >> ~max/.ssh/authorized_keys
exit
Is what it says in the manual. But where do I have to type that in, in the Ubuntu console that opens for Putty if I run it as Ubuntu user? If so, what is in this case? The same public long IP address that I used from AWS? And then it says path to keygen, but do I know this path already? It's only stored on my PC here right now, so don't I have to generate it on the Ubuntu machine first?
So I tried $ ssh-keygen and had it automatically save and then try the second line of code with the sudo command and it gave me an error that I had to permission to do that.
So I'm a bit confused here. It says to change the key from Ubuntu to Max user in the Amazon section which is followed by the Google Cloud section and finally with Win 10. I assume this Windows 10 section works for AWS as well and is not part of the previous Google Cloud section. But it starts by already using the max user as login, which confuses me a bit.
Could someone please elaborate this process in more details to me, so I can log into the AMI as max user?
Hi @Hydrag1, sorry for the delay, I'm sure straight away what the answer is here, but I will try to look into this next week
Thank you for the reply!
I was testing it a few times but every time I open an aws console for a while it will charge me money so I can't test everything. I tried adding the key directly to putty instead of pageant and then using the ubuntu user and this works well. It's just this max user that I can't seem to be able to log into. And even trying to give permissions to it while in ubuntu fails for me.
Hi @Hydrag1 , sorry for the delay.
Just to make sure we understand what you are doing: You were using AWS image of the v20.05.1 cloud edition, and you are following these instructions, is that correct?
But where do I have to type that in, in the Ubuntu console that opens for Putty if I run it as Ubuntu user?
exactly
If so, what is in this case? The same public long IP address that I used from AWS?
Yes, <IP>
is the IP address of the AWS VM
And then it says path to keygen, but do I know this path already? It's only stored on my PC here right now, so don't I have to generate it on the Ubuntu machine first?
I think ssh-keygen
only appears in the instructions for Google Cloud, not in the ones for AWS (AWS creates the key for you - with GCP you have to create it yourself).
P.S. @chrisjsewell looking at the latest releases they no longer say desktop/cloud, but the documentation still refers to these terms. Could you please look into fixing that?
Hi, so under launch instances at AWS I chose the community ami and then
'quantum-mobile-20-05-1 - ami-006638a0a99849fc3'
I chose an instance and set the key and downloaded it to my PC and then launched the instance.
I followed the instructions as given, so I converted the key, then ran pageant, and then configured Putty but it doesn't
work with those settings.
If I follow the AWS instructions, that aren't using Putty and therefore add the key directly to Putty, it opens the console for me and I can sign it with Ubuntu, not with Max.
I'm having difficulties with the guidance from then on, however. Since the tutorial page covers both cases, AWS and then Google Cloud I'm not sure how to combine that with the instructions given for Putty on the bottom. Because for Amazon you create the instance and then the 'Important' box tells you about this SSH code, while on the bottom the Putty one starts directly by using Pageant.
So what exactly do I have to do after launching the instance? Do I need a second Linux SSH client to log into it first, then apply the code to shift the key to the Max user and then log in from Putty, or does the use of Putty usually just skip this instruction by the use of Pageant?
The tutorial is really really detailed but exactly at that part, it may skip a bit too much for inexperienced users. I also showed them to two friends who programmers and they couldn't tell me what to do either. It just sounds very confusing, because, if this is to be typed into the Linux machine, why does it require the IP address if you are already logged into it as a user, and where is the path to key if the key is stored on my PC?
Hi @Hydrag1 - thanks for the detailed explanation. I now see the issue - the ssh setup instructions were probably copied from somewhere else and don't fit well to the instructions above.
If I follow the AWS instructions, that aren't using Putty and therefore add the key directly to Putty, it opens the console for me and I can sign it with Ubuntu, not with Max.
Great - if you were able to sign in as the ubuntu user, you're already almost there.
If you successfully executed the line
sudo cat ~ubuntu/.ssh/authorized_keys >> ~max/.ssh/authorized_keys
on the VM (as the ubuntu user), then, in principle, you should be able to simply change the username in putty from ubuntu to max and be able to connect.
If that doesn't work for some reason, you can also just keep using the ubuntu
user - if you type
su max
after you login, you will become the max user.
Using Putty can definitely be useful for playing around with AiiDA, but for production use I would suggest to use the Windows subsystem for linux, which comes with an SSH client (and would also allow to install AiiDA on your machine).
Thank you for the reply, I will try that later when I'm home. Honestly, I haven't used Aiida before. Was looking for the Quantum Mobile instance because the description says it would come with most programs already. I basically only require the pw.exe for the SCF calculation. I already have all the inputs ready. I hope this is possible for Quantum Mobile to run pw.exe directly from the command line like you would do it in Windows from CMD.
I hope this is possible for Quantum Mobile to run pw.exe directly from the command line like you would do it in Windows from CMD.
Sure, pw.x
is already in the path.