can't connect to AWS EC2 instances, although routing seems correct
i used AWS in the past (2014-2015), no issues at all. Then i switched to Digital Ocean. Now the new t3 instances look very interesting, so i launched some, but i can't connect.
I did the official troubleshooting guide () and still, no connections are possible.
Inbound SSH traffic from my IP addresses is enabled in the Security Group, and all outbound traffic.
The VPC has a Route Table that is connected to an Internet Gateway.
The Network ACL allows incoming and outgoing traffic from all IP addresses.
The guide says "If you have completed these steps and you are still unable to connect to your EC2 instance, make sure the SSH daemon is running on the EC2 instance, and that it is configured to listen on the default port (TCP 22).", but i tried several fresh instances, RHEL and Ubuntu, they should listen on 22.
... what else could be wrong?
Would appreciate any help a lot, thanks in advance!
1 answer
- answered 2018-11-11 16:28 Arjuna Bandara
Are you working on a proxy? Is SSH daemon running on the EC2 instance?
Try to connect by disabling firewall temporarily.
See also questions close to this topic
- Can cognito sign-in verification email contain image?
I'm trying to figure out how to send cognito sign-in verification email (1) in the user preferred language, and (2) in HTML with images (such as the company logo).
For (1), I found this link Will Cognito User Pools support internationalization? and the answer suggests using Lambda triggers with custom attribute for language selection. The solution looks promising and I will definitely give it a try.
For (2) including image in email, I found base64 encoded images in email signatures which suggests two ways, (A) embed image using data URI within the tag, and (B) embed image as attachment. I tried (A) and it works for Thunderbird email client, but not for Gmail.
So my question is: is there a way to send cognito verification email with image?
Thanks!
Bing
- Aws CloudWatch filtering compact json with @ in it
We use serilog to output from our .nrt core app. We are using compact json to keep size down. In compact it seems to put the error key with an @ sign;
"@l": "Warning"
I can’t seem to get a filter working it either returns no results or says error. I’ve tried many things but I’m sure this should work;
{ $.@l = "Warning" }
Anyone suggest where I’m going wrong.
- AWS Cognito - Using "CookieStorage" to keep users logged in over multiple sub-domains (JavaScript SDK)
I am currently writing a web application that will have "mydomain.com" (login & signup forms) and "app.mydomain.com" (dashboard that requires authentication to view).
I am writing this in React JS using AWS Cloudfront + S3 for a serverless SPA.
mydomain.com
UserPool.JS - Imported whenever the User Pool needs to be accessed
import { CognitoUserPool, CookieStorage } from 'amazon-cognito-identity-js'; const poolData = { UserPoolId: 'XXX', ClientId: 'YYY', Storage: new CookieStorage({ secure: false, domain: 'mydomain.com' }) }; export default new CognitoUserPool(poolData);
Login.js - Relevant snippet where I attempt to login the user
// ... const user = new CognitoUser({ Username, Pool: UserPool, Storage: new CookieStorage({ secure: false, domain: 'mydomain.com' }) }); user.authenticateUser(authDetails, { // ... }) // ...
So far this code works, when I revisit mydomain.com I see the navigation says "Logout" and "Dashboard" instead of "Login" and "Signup", so the main website understands that I'm logged in. After logging in here I redirect the user to app.mydomain.com:
app.mydomain.com
UserPool.js - See above, exactly the same as the "mydomain.com" file
Account.js - Relevant snippet that I use to check if the user is authenticated or not, if so I return needed data about that user
getSession = async (redirect = true) => { return await new Promise((resolve, reject) => { const user = UserPool.getCurrentUser(); console.log(user); if (user) { user.getSession((err, session) => { const apiKey = Cookies.getCookie('api-key'); if (err || !session.isValid() || !apiKey) { this.requestLogin(redirect); reject(); return; } const token = session.getIdToken().getJwtToken(); resolve({ user, apiKey, payload: session.getIdToken().decodePayload(), token, sub: session.accessToken.payload.sub, headers: { 'x-api-key': apiKey, Authorization: token } }); }); } else { this.requestLogin(redirect); reject(); } }); };
The console log here always says that my user is null, again this is accessed from "app.mydomain.com". At this stage my user is redirected to "mydomain.com/login" via my requestLogin() method. Every time I attempt to login from "mydomain.com" I get redirected to "app.mydomain.com" and then a second later I get redirected back to "mydomain.com/login".
How can I have Cognito "share login status" between "mydomain.com" and "app.mydomain.com"?
Thank you!
- Running multiple Python/FORTRAN codes for scientific computations with Amazon EC2
I have few python and fortran code developed for conducting scientific simulations for a research problem. 90% of the code can only be executed as a serial process as the solution procedure is implicit. Often, while running the code in my laptop, I have noticed that it occupies 1 full core of the CPU at 90-100% all the time during simulation and each simulation lasts for 10+ hours.
But now as I need to run the same code multiple times, it has becomes too slow to do it in my laptop and it limit smooth functioning for other activities during the period of the simulation. My code generally requires low memory (<1 GB) but high computational power. It requires no data transfer while running the simulation. Below are the two answers I seek:
- Which ec2 instance type in Amazon Web Service (AWS) would be the best fit?
- Is it advisable to run, say 7 separate codes within an 8 vCPU machine or 7 codes in separate 2 vCPU multiple machines. I find the pricing for the latter in AWS to be economical. Also since high CPU rate is a requirement for my code, I have noticed that lower cores seems to offer more CPU speed.
I would appreciate anyguidance in this matter.
Thanks!
- Simple Node.js Vue/Nuxt Start Script Issue - AWS EC2
I'm trying to do an incredibly basic deploy of a Vue/Nuxt app with AWS CodeDeploy. I'm following the AWS tutorial and it's been straightforward so far.
I ran into a glaring problem when starting the nuxt server:
It seems that it's the install script is timing out because
Listening on: ...is obviously just waiting for connections
I'm not seeing any nuxt options to run this as a daemon or anything of the sort. Can I override the
nuxt startscript in any way? Am I approaching this incorrectly?
- Continuous Integration With VSTS and AWS EC2 Instances
We are managing source code in the VSTS there we had the Main Git Branch. And now we want to automate the deployment/release process with AWS EC2 instance.
We installed the AWS Toolkit for Visual Studio 2017 from the marketplace.
Can anyone guide how to deploy to AWS EC2 instance from VSTS?
-?
- Is there any free WebUI tools for administrating and monitoring MongoDb server instance similar to Atlas Cloud?
I am searching for tool, which should provide collections overview, queries to them, replicas configurations, instance performance dashboards.
- Your password does not satisfy the current policy requirements erorr in ubuntu 18.04
sql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.35.33.33' WITH GRANT OPTION;
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql cannot grant privilege to user, getting error: ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
After removing valdiate plugin .now i am getting following eror
Failed to connect to Mysql at ip:3306 with user root
Host 'anotherip' is not allowed to connect to this Mysql server
I already unistalled valdiate password plugin still i cant able to connect in mysql workbench
even i set
bind-address = 0.0.0.0
I have installed latest ubuntu with php and mysql in my vps server
- Google cloud VPS cpu usage anomaly every day at the same time
I have problem with Google Cloud VPS. Ubuntu 14.04 the cheapest option with 0.6GB RAM. I use them to run browser script in imacros. I want it to be running 24/7. Every day around 9 AM on all my machines (10) CPU usage rises up from 40% to 100% disk usage rises too. It takes 5 minutes then everything back to normal but several machines run out of ram so they close browser with macro running. Can anyone help me with this anomaly?
- AWS S3 ObjectCreated triggers lambda with delay
I've configured the simple trigger for lambda, which process image up on arrive to S3. In general, the lambda triggered with minimum delay, many times in the same second when S3 received the image. But, occasionally, around 7% cases, there is a delay between image received and ObjectCreated event, this delay could be up to 19 seconds!! (9-10 seconds in average).
Any idea how to avoid this delay?
This delay makes me impossible to use S3->Lambda triggers for high performance real time apps.
- AWS ELB and VPC Router interaction
I have a pretty simple question that drives me nuts. I am trying to understand how VPC router (routing tables) and ELB interact with another. I read documentation and tried understanding it, but without success. My current understanding of a VPC is pretty much like this:
- Data passes the I-GW
- The I-GW uses the VPC router and its routing tables to forward the request/traffic to the ELB.
- The ELB is used to address e.g. EC2 instances
What I think I got from the internet:
- Data passes the I-GW
- The ELB is using listeners to determine incoming traffic (e.g. Port 80)
- ELB is forwarding the traffic to the instances.
- Create AWS SQS Endpoint for VPC
I have two subnets in a VPC. One is public subnet and other is a private subnet. All EC2 instances in the public subnet and private subnet should access SQS, even if the internet is not reachable.
Is there a way like DNS filtering/SQS IP filtering on the outbound traffic so that the EC2 instances can access only AWS SQS service within VPC, without assigning public-IP to the instances?