mstdmstdd Posted March 17, 2017 Share Posted March 17, 2017 Hello!I read here http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html How To start a PuTTY session.From My AWS installation I have Instance ID and Public DNS (IPv4)).But I failed to login using putty. I do :1) Registering at AWC I downloaded and saved next pem file.http://imgur.com/a/62kWU2) As I have no puttygen in my kubuntu 16 so I created in puttygen under windows new ppk file likehttp://imgur.com/a/0DR6c3) Opening putty in hostname field I enter Public DNS (IPv4)) in hostname fieldhttp://imgur.com/a/VejGE4) and selecting file from 2)http://imgur.com/a/uolpI5) and clicking “Open” I got errorhttp://imgur.com/a/EZYxhWas step 2) wrong (or what had I to enter there)? How to fix it?Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/303476-can-not-login-in-aws-putty/ Share on other sites More sharing options...
requinix Posted March 17, 2017 Share Posted March 17, 2017 #3 is wrong. That field is just the hostname. No username. No @. Put the username in the Connection > Data (I think) pane. Quote Link to comment https://forums.phpfreaks.com/topic/303476-can-not-login-in-aws-putty/#findComment-1544312 Share on other sites More sharing options...
kicken Posted March 18, 2017 Share Posted March 18, 2017 Putty on windows allows the username and host name to be combined, not sure if it's different on linux. Since the error shows the root@ bit it looks like it probably isn't interpreting it as separate components so yea, try it without the username. Quote Link to comment https://forums.phpfreaks.com/topic/303476-can-not-login-in-aws-putty/#findComment-1544326 Share on other sites More sharing options...
Sudhircev Posted March 19, 2017 Share Posted March 19, 2017 Have you entered correct IP and Password? Is ssh server installed on source server? Quote Link to comment https://forums.phpfreaks.com/topic/303476-can-not-login-in-aws-putty/#findComment-1544383 Share on other sites More sharing options...
mstdmstdd Posted March 20, 2017 Author Share Posted March 20, 2017 #3 is wrong. That field is just the hostname. No username. No @. Put the username in the Connection > Data (I think) pane. username - is it "root"/"ubuntu" as I reads in aws docs ? Or that value from aws registration ? Quote Link to comment https://forums.phpfreaks.com/topic/303476-can-not-login-in-aws-putty/#findComment-1544416 Share on other sites More sharing options...
mstdmstdd Posted March 20, 2017 Author Share Posted March 20, 2017 Also I have ssh command in my console. Is it better to use it? If yes how ? Please, give hints how to start... Quote Link to comment https://forums.phpfreaks.com/topic/303476-can-not-login-in-aws-putty/#findComment-1544418 Share on other sites More sharing options...
requinix Posted March 20, 2017 Share Posted March 20, 2017 username - is it "root"/"ubuntu" as I reads in aws docs ? Or that value from aws registration ?Depends how the AMI was built. IIRC the official Canonical images use "ubuntu" as the user. Also I have ssh command in my console. Is it better to use it? If yes how ? Please, give hints how to start...Putty is basically just a fancy GUI around ssh. If you like Putty then use it. If you want to use ssh then use that. For ssh the command looks like $ ssh -i /path/to/key.pem username@hostNote that's a PEM-encoded key. Putty uses PPK format. They are not the same; Putty has a converter tool you can use. Since typing that out is annoying, I personally use an alias in the bashrc/whatever file: $ alias shh = ssh -i /path/to/key-that-I-use-for-all-instances.pem $ shh username@host Quote Link to comment https://forums.phpfreaks.com/topic/303476-can-not-login-in-aws-putty/#findComment-1544419 Share on other sites More sharing options...
mstdmstdd Posted March 21, 2017 Author Share Posted March 21, 2017 Thank you,I logged in ssh and made update of system using commands : sudo apt-get update sudo apt-get upgrade I read in docs : sudo yum install -y httpd24 php70 mysql56-server php70-mysqlnd I have no yum and seems packets are different, as I got: $ sudo apt-get install -y httpd php Reading package lists... Done Building dependency tree Reading state information... Done Package httpd is a virtual package provided by: nginx-naxsi 1.4.6-1ubuntu3.7 nginx-light 1.4.6-1ubuntu3.7 nginx-full 1.4.6-1ubuntu3.7 nginx-extras 1.4.6-1ubuntu3.7 bozohttpd 20111118-1+deb7u1build0.14.04.1 apache2-mpm-itk 2.4.7-1ubuntu4.13 nginx-core 1.4.6-1ubuntu3.7 apache2-mpm-worker 2.4.7-1ubuntu4.13 apache2-mpm-prefork 2.4.7-1ubuntu4.13 apache2-mpm-event 2.4.7-1ubuntu4.13 apache2-bin 2.4.7-1ubuntu4.13 yaws 1.98-2 webfs 1.21+ds1-9 tntnet 2.2.1-1 ocsigenserver 2.2.0-3 mini-httpd 1.19-9.3 micro-httpd 20051212-15 lighttpd 1.4.33-1+nmu2ubuntu2 ebhttpd 1:1.0.dfsg.1-4.3 boa 0.94.14rc21-5 aolserver4-daemon 4.5.1-16 aolserver4-core 4.5.1-16 You should explicitly select one to install. E: Package 'httpd' has no installation candidate E: Unable to locate package php Which httpd have I to select and I do not see any php packet at all?I do not need something especial, just apache2/php7/mysql5.I want to install demo of my apps for testing, there would be no big traffic.Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/303476-can-not-login-in-aws-putty/#findComment-1544432 Share on other sites More sharing options...
requinix Posted March 21, 2017 Share Posted March 21, 2017 I don't know what docs you're reading but this isn't right: sudo yum install -y httpd24 php70 mysql56-server php70-mysqlndUbuntu's Apache and PHP packages are not named like that, plus it prefers apt over yum or dpkg. Also looks like you're using Trusty? It's a bit old now and is limited to PHP 5. You need Xenial. Quote Link to comment https://forums.phpfreaks.com/topic/303476-can-not-login-in-aws-putty/#findComment-1544444 Share on other sites More sharing options...
mstdmstdd Posted March 21, 2017 Author Share Posted March 21, 2017 yes, Looks like that is really old version : $ uname -a Linux ip-172-31-18-55 3.13.0-110-generic #157-Ubuntu SMP Mon Feb 20 11:54:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux ubuntu@ip-172-31-18-55:~$ lsb_release -d; uname -r; uname -i Description: Ubuntu 14.04.5 LTS 3.13.0-110-generic x86_64 Quote Link to comment https://forums.phpfreaks.com/topic/303476-can-not-login-in-aws-putty/#findComment-1544446 Share on other sites More sharing options...
mstdmstdd Posted March 21, 2017 Author Share Posted March 21, 2017 In list of my instances there 2 itemshttp://imgur.com/a/xwEucand the second is later Kubuntu 16. First instance was 14 suppose, I remember that I created 2 instances.in ssh I got : $ ssh -i /home/serge/UbuntuWithLamp.pem ubuntu@ec2-54-201-141-175.us-west-2.compute.amazonaws.com ssh: Could not resolve hostname \357\273\277ec2-54-201-141-175.us-west-2.compute.amazonaws.com: Name or service not known serge@serge-at-home:/_wwwroot/wprods$ ssh -i /home/serge/UbuntuWithLamp.pem ec2-54-201-141-175.us-west-2.compute.amazonaws.com Permission denied (publickey). Which access I lack? Must be it be other pem file and how to create it for this instance with ubuntu16?But I logged to the system under putty using ppk fileand see that it is ubuntu16http://imgur.com/a/Wrvg0? Quote Link to comment https://forums.phpfreaks.com/topic/303476-can-not-login-in-aws-putty/#findComment-1544447 Share on other sites More sharing options...
requinix Posted March 21, 2017 Share Posted March 21, 2017 You seem to have a knack for copying and pasting stuff without actually knowing what you're doing. $ ssh -i /home/serge/UbuntuWithLamp.pem ubuntu@ec2-54-201-141-175.us-west-2.compute.amazonaws.com ssh: Could not resolve hostname \357\273\277ec2-54-201-141-175.us-west-2.compute.amazonaws.com: Name or service not knownDoes the hostname "\357\273\277ec2-54-201-141-175.us-west-2.compute.amazonaws.com" look correct to you? I don't know what you did but it doesn't look right to me. $ ssh -i /home/serge/UbuntuWithLamp.pem ec2-54-201-141-175.us-west-2.compute.amazonaws.com Permission denied (publickey).It was able to find the host this time, however it didn't like your credentials. It could possibly, possibly, have something to do with the fact that you didn't have the username in there. Quote Link to comment https://forums.phpfreaks.com/topic/303476-can-not-login-in-aws-putty/#findComment-1544458 Share on other sites More sharing options...
mstdmstdd Posted March 24, 2017 Author Share Posted March 24, 2017 Thank you for help!I created new instance with selecting pem file for it and has access to it ok.What Next ?Actually registering on AWS I got this link from AWS supporthttp://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.htmlI found this articlehttps://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04and try to make it by steps. I come to text : You can do a spot check right away to verify that everything went asplanned by visiting your server's public IP address in your web browser(see the note under the next heading to find out what your public IP address is if you do not have this information already):http://your_server_IP_address I run all commands above in this article(includiong firewell commands)But I stuck on my IP?I tried to run in browserhttps://ec2-54-190-48-33.us-west-2.compute.amazonaws.com/http://ec2-54-190-48-33.us-west-2.compute.amazonaws.com/ec2-54-190-48-33.us-west-2.compute.amazonaws.com/but nothing opened in my browser. Which is the right ip? Quote Link to comment https://forums.phpfreaks.com/topic/303476-can-not-login-in-aws-putty/#findComment-1544525 Share on other sites More sharing options...
requinix Posted March 24, 2017 Share Posted March 24, 2017 All of those are the same. "Firewall commands?" Unless those commands involve the AWS CLI that's the wrong firewall: you need to edit the instance's security group to allow you to connect to it over HTTP. There will already be an exception for SSH. Be sure to only allow your IP address. Quote Link to comment https://forums.phpfreaks.com/topic/303476-can-not-login-in-aws-putty/#findComment-1544531 Share on other sites More sharing options...
mstdmstdd Posted March 25, 2017 Author Share Posted March 25, 2017 Do you mean this group?http://imgur.com/a/v4HnLCreating new instance in this group I set 1 property - I selected pem file for this group.Had I to set some more options ?Can these options be edited now and where ?http://imgur.com/a/1LFAuHow these properties entintled and where located ? Quote Link to comment https://forums.phpfreaks.com/topic/303476-can-not-login-in-aws-putty/#findComment-1544578 Share on other sites More sharing options...
requinix Posted March 25, 2017 Share Posted March 25, 2017 Check the Inbound rules to make sure there's something for HTTP (and HTTPS if you need that) for your IP address. Quote Link to comment https://forums.phpfreaks.com/topic/303476-can-not-login-in-aws-putty/#findComment-1544581 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.