Connect to AWS EC2 instance | SSH from Windows | .PEM Key
SSH is a remote management protocol through which you connect to your remote servers and modify them.
This allows you to access your remote servers securely. So let us see how we can connect with our EC2 instances securely using SSH
Recent versions of Windows Server 2019 and Windows 10 - OpenSSH is included as an installable component
ec2-user
Public IP
github.com/PowerShell/Win32-O...
Lab
Launch EC2
Download .pem file
Use command prompt or Powershell to ssh
Previous Videos
Create EC2 Instance in AWS I Run Web Server using User Data | AWS EC2
• Create EC2 Instance in...
Amazon Ec2 Instance Security Groups | Inbound and Outbound Rules
• Amazon Ec2 Instance Se...
Пікірлер: 123
You have no idea how much time you saved me by providing this video. I was stuck in a tutorial from my school and this explained it clearly and concisely. Thank you!!!
@JasCloudTech
5 ай бұрын
@Ryan glad to know …. 😊 🙏
@DIZZLEBOI44
4 ай бұрын
@JasCloudTech Great video. Thanks. Have a question, trying to now connect my VPN to my ec2 and use it as a Hotspot. Is it possible?
@JasCloudTech
4 ай бұрын
@@DIZZLEBOI44 you can .. take care of security group inbound outbound , ip forwarding NAT and also DHCP in order to assign ip to devices 😀
Thanks, my man! You sorted out something I was finding really insoluble. Its the part in the video where you talk about how the VPC should have an Internet Gateway attached with a status of "Active". I was getting timeout errors and could'nt understand what was going on because my security group had port 22 open. So on watching your video, I checked the Route Table and found the Internet Gateway in the VPC Route Table had a status of "Blackhole". The Internet gateway itself had a State of detached. I must have detached it when cleaning up resources. Anyways, after reattaching, the IG became active and I could SSH into the EC2 instance. Cheers! I would have had a hard time finding this on my own. I've subscribed and am looking forward to your next videos.
@JasCloudTech
Жыл бұрын
@Steve thanks for your support and kind words 🙏... more video’s coming soon 😊
The 500th subscriber, so very much appreciates your playlist about the fundamentals of AWS. Please make more for everyone can access the simple knowledge from you JasCloudTech. Thanks advanced
@JasCloudTech
Жыл бұрын
Thanks for the support… definitely more videos on the way 😊… keep supporting…
@tuhuynh2232
Жыл бұрын
@@JasCloudTech for sure, keep as simple as possible, I like you a lot
@JasCloudTech
Жыл бұрын
@@tuhuynh2232 sure Thanks 😊
Something I learned back in the IT days that helps to speed up copying file names, is hold hold shift, right-click and select 'copy as path'. Then you can paste the entire path with the file name all in one step.
@JasCloudTech
Жыл бұрын
Thanks for the suggestion 🎉 … I try to keep the video as basic as possible and all my videos are on the go without editing… 😊
@annas_solami
8 ай бұрын
thanks
Thank you so much for this. I was missing the Internet Gateway on a default EC2 Instance configuration. I spent 2 days on this thank you man. I was not thinking about my IG at all
@JasCloudTech
9 ай бұрын
@theguru5768 welcome 🙏… great to know .. my video resolved your issue … please do like share my videos… thanks for watching 😊
My Brother, you can't imagine how i was struggling with this to just start the ec2 via ssh, the error which i was getting was with port:22, The moment you 've said about vpc/igw, there i figured out, igw(internet gateway), thank again.
@JasCloudTech
9 ай бұрын
@khaderuddinwaseemmohammed … thanks 🙏
@JasCloudTech Thank you so much for this. I was missing the Internet Gateway on a default EC2 Instance configuration. I spent 2 days on this thank you man. I was not thinking about my IG at all
@JasCloudTech
Жыл бұрын
@Richard … that’s great … thanks 🙏 for watching… 😊
Thanks, really helpful video!
@JasCloudTech
Жыл бұрын
@Tine thanks for watching ☺️
Thank you for your clear explanation
@JasCloudTech
4 ай бұрын
@ushat welcome 🙏…😊
thank you very very much sir
@JasCloudTech
Жыл бұрын
Welcome… thanks for watching.. do like share my videos
very valuable thank you ,
@JasCloudTech
2 жыл бұрын
Welcome Aly .. please do like share and subscribe to my channel.. thanks for watching
Thank you bro and subscribed you :)
@JasCloudTech
Жыл бұрын
Welcome … thanks for supporting 😊
Thank you very much
@JasCloudTech
Жыл бұрын
@srikanth thanks 🙏 for watching…
Very helpful..
@JasCloudTech
Жыл бұрын
Glad it was helpful! 😊
Thank you for vídeo!
@JasCloudTech
Жыл бұрын
@marechalff 🙏 welcome… Please do like share … thanks for watching 😊
Hello, thanks for this video tutorial. Its helpful. But you didn't show how you created the route tables and internet gateways?
@JasCloudTech
2 жыл бұрын
Hi Michael .. by default route table and internet gateway gets created . Thanks for watching.. please do like and share 🙏
You are the best of the best of the best of the best... ! :)
@JasCloudTech
3 ай бұрын
@Maria 😊 thanks 🙏…
Wow that's is the great video ....i was spending couple of hours to connect to AWS instance by putty it is not worked ..after going through your video putty is not required so we can directly connect from cmd
@JasCloudTech
7 ай бұрын
👍 you can also check ec2 access using putty kzread.info/dash/bejne/oGVt06uOdbPXgdo.htmlfeature=shared
Thank you😍
@JasCloudTech
6 ай бұрын
😊 🙏
I use Ubuntu there , it shows me permission denied publickey., same issue
@JasCloudTech
6 ай бұрын
@tanveerkaurbenipal6862 Make sure user have access permission to .pem file and username ubuntu
I checked the Igw and inbound rules…but still I am getting timed out error
Thanks with helping me. Take you care - if you have a some free time you can help me with English practice :) also
thanks mate
@JasCloudTech
Жыл бұрын
@montagrus … welcome 🙏
thx it finally works that sheeeeett
@grzegorzodak5657
6 ай бұрын
sry, I'm little drunk rn
@JasCloudTech
6 ай бұрын
🍻🥂
HI what is next? How can I access the files using the command prompt?
@JasCloudTech
Жыл бұрын
Hi @pinotes you can use the linux commands --> ls , cat ……. Thanks 🙏 for watching…
COOL
@JasCloudTech
Жыл бұрын
@massyl thanks 🙏 for watching 😊
Hello thanks a lot for this. I have a question, you know how can i connect to ec2 using a ssh key without enter the username "ec2-user"? Im using ansible, and i want do it in my "when" condition or something like that, for different linux distribitions like ubuntu and centos. Thanks. 😊
@JasCloudTech
Жыл бұрын
@J’aime thanks … I haven’t worked on ansible … you can go through www.middlewareinventory.com/blog/add-users-to-ec2-instances-with-ssh-access-ansible/ .. I hope it will give you some idea …
@jaimedan2358
Жыл бұрын
@@JasCloudTechThanks, i Found my hapiness 🎉
Все делаю как по вашей инструкции но не могу соеденится по ssh. What should i do ? Im already did instructions but cant get a result.
@JasCloudTech
8 ай бұрын
@Greykoff kindly check the VPC route table and Internet gateway status.... if not resolved you can communicate me on my email for troubleshooting the issue. :D
The cmd shows "WARNING: UNPROTECTED PRIVATE KEY FILE!". What should I do in this case?
@JasCloudTech
Жыл бұрын
@danish update the permission for private key file to only allow read access for current user
@danishwais2701
Жыл бұрын
@@JasCloudTech where do I update this?
@JasCloudTech
Жыл бұрын
@@danishwais2701 kindly share the screenshot at jaspalsaini45@gmail.com ..
@ankitachauhan5832
Жыл бұрын
@@JasCloudTech iam. Not. Able. To. Do. It.. Sir.. It is showing permission denied (public key)
@JasCloudTech
Жыл бұрын
@@ankitachauhan5832 kindly check the the user have access permission for the location where the .pem key is saved.. if issue persists kindly share screenshot on my email jaspalsaini45@gmail.com
hahaa, thank so much
@JasCloudTech
Ай бұрын
🫨. 😀 welcome 🤗
Nice job. The private ip address is unique ? Safe to share ? I have homework but I am wondering if is safe to send homework that contains my private ip address
@JasCloudTech
9 ай бұрын
It’s safer … traceable by other devices in your network… private Ip are not directly connected to internet… 😊
@germainkone9029
9 ай бұрын
@@JasCloudTech thanks for the inputs. I appreciate it.
I'm getting a warning: unprotected private file! when I try to ssh into my ec2.
@JasCloudTech
2 ай бұрын
Grant read only permission for pem file to current user …
Sir after create instance public ipv4 address showing blank
@JasCloudTech
4 ай бұрын
@ramyarajendran check route table having route to internet gateway..
'ssh' is not recognized as an internal or external command, operable program or batch file. why ithis error come wen submit ssh key
@JasCloudTech
11 ай бұрын
May I know the OS version
Am i suppose to download Ubuntu on my system before i can use my cmd
@JasCloudTech
3 ай бұрын
@josephokwudi no need to download Ubuntu or anything on your system ..🤗
Hello.. I have created Ubuntu Ec2 instance in my windows system and I am trying to connect Aws Ec2 instance from command prompt but I am getting connection timed out error..Can anyone please help me on this!
@JasCloudTech
6 ай бұрын
@priyatalakola r u saying you installed Ubuntu on ur windows os by downloading Ami or you are launching in console… if igw, inbound is fine check ur subnet … if u need troubleshooting session you can schedule zoom or teams meeting and send on my email will resolve the issue
"Bad permissions. Try removing permissions for user: BUILTIN\\Users on file" getting this
@JasCloudTech
Ай бұрын
icacls "C:\path\to\file_or_directory" /remove "BUILTIN\Users" Else first remove inheritance cd C:\path\to\your\pem\file icacls your-key.pem /inheritance:r Grant read access icacls your-key.pem /grant:r "%username%":R
Did any one get solution how to connect if u receive Permission denied
@JasCloudTech
Жыл бұрын
@dambrudhar check user type default is ec2-user -- the location where the key is make sure you have read access for the operating system that you are using … right click properties check … -- under action- ssh client check the user (ec2-user default ) - last use ssh -v -i……….. to debug the error
How to connect reverse from EC2 instance to Local Machine? Can anyone tell.
@JasCloudTech
10 ай бұрын
@royalstars8229 you mean to say you want to set up hybrid network .. Aws ec2 & your on premises network You can go ahead with Direct Connect and VPN..
it says permission denied (public key)
@JasCloudTech
Жыл бұрын
Please check the ec2 access role assigned.. if issue Persists let me know
Connection timed out error but why
@JasCloudTech
9 ай бұрын
@sahil … first thing check inbound rules in the security group (port 22)and have you restarted Ec2 it might change your public dns..and check also routing table …route to internet gateway…
how to use ec2 if i have pem key
@JasCloudTech
7 ай бұрын
@niluthonte can you elaborate … in the video I am using pem key to connect … ..using public dns …
@niluthonte45
7 ай бұрын
Ok
How to run PuTTY ssh
@JasCloudTech
Жыл бұрын
Download putty … download .pem file and then use the putty interface add auth.. use ec2-user for Amazon Linux
Why im getting error saying connection timed out
@JasCloudTech
7 ай бұрын
@prasannajitlenka check the inbound rule port 22 is allowed ??
@prasannajitlenka2870
7 ай бұрын
@@JasCloudTech I got the problem it was restricted in our college lan
How can I log out
@JasCloudTech
2 ай бұрын
Exit 😊
@jadiel_jade
2 ай бұрын
No... I mean I'd like to restart the process without it saying that I was logged on before
@JasCloudTech
2 ай бұрын
@@jadiel_jade I m sorry I am unable to understand your question… can you please elaborate 🙏 😊
I keep getting an error said permission denied (publickey) somebody help 😢
@JasCloudTech
Жыл бұрын
@kritta does you user has ec2 access role assigned ..
@krittanails8965
Жыл бұрын
@@JasCloudTech I’m quite not sure where I could check on that.
@JasCloudTech
Жыл бұрын
@@krittanails8965 select ec2 under details you can check .. if possible share the screenshot on jaspalsaini45@gmail.com
@Moment-Driven
Жыл бұрын
@@JasCloudTech I'm having the same issue, it says (publickey) after permission denied in the CMD prompt
@JasCloudTech
Жыл бұрын
@@Moment-Driven kindly check the user has ec2 access role assigned… if issue persists kindly let me know
Make a video using putty also
@JasCloudTech
Жыл бұрын
@sreedevan sure …
@sreedevank6247
Жыл бұрын
@@JasCloudTech from existing instances
did not work
@JasCloudTech
3 ай бұрын
@ayanikabera can you please let me know what’s the error … timeout .. access denied , check inbound rule port 22 , igw…
@ayanikabera7060
3 ай бұрын
@@JasCloudTech i followed eevrything here and i still get this error "ssh: connect to host port 22: Connection timed out" . i checked/added necessary inbound rules as well.
@JasCloudTech
3 ай бұрын
@@ayanikabera7060route table and internet gateway ?? After creation did you restarted your instance ??
@ayanikabera7060
3 ай бұрын
@@JasCloudTech yes route table and internet gateway were exactly what you showed in your video. i did not restart instance.. i did refresh it...
@ayanikabera7060
3 ай бұрын
@@JasCloudTech okay i rebooted.. still getting the same error