How To Avoid SSH with default ec2-user | FedRAMP | How to create a custom user in AWS EC2

Published: 10 February 2024
on channel: CloudTech AWS & Azure & GCP for Everyone 🤝
98
9

How To Avoid SSH with default ec2-user | Prevent FedRAMP | How to create a custom user in AWS EC2 #fedramp #user #sshorts

How to delete a user from the AWS Linux ec2 instance
userdel -r cloudtech

How to List Users from the AWS Linux ec2 instance
getent passwd

---------------------------------------------------------------------------------------------
AWS CLI create ec2 instance | How to create an ec2 instance in AWS using CLI ⏩    • AWS CLI create ec2 instance | How to ...  
How to Connect AWS EC2 by AWS Session Manager ⏩    • How to Connect AWS EC2 by AWS Session...  
Create an EC2 Instance with EC2 User Data Script ⏩    • Create an EC2 Instance with EC2 User ...  
Amazon Route 53 ⏩    • How to Connect Godaddy Domain with Am...  
How To Create an AWS Windows Server EC2 Instance ⏩    • How To Create an AWS Windows Server E...  
AWS Tutorial For Beginning ⏩    • AWS Tutorial For Beginning  
CloudFront Distribution ⏩    • AWS CloudFront | CloudFront Distribut...  
AWS Jump Box/Bastion Hosts ⏩    • AWS Bastion Host | AWS Access a Priva...  
AWS Toolkit for JetBrains/PyCharm ⏩    • Run Locally & Deploy a SAM in AWS by ...  
AWS SAM CLI Setup Guide ⏩    • AWS SAM CLI Setup Guide  | AWS Server...  
Steps to Create Serverless Application Run locally and deploy In AWS ⏩    • Steps to Create Serverless Applicatio...  

AWS CodeCommit | Git with IAM Role on EC2 Instances ⏩    • AWS CodeCommit | Git with IAM Role on...  

How to Connect AWS EC2 by AWS Session Manager ⏩    • How to Connect AWS EC2 by AWS Session...  

How to Create AWS RDS database ⏩    • How to Create PostgreSQL Database in ...  
How to create MySQL Server on AWS EC2 Instance ⏩   • How to create MySQL Server on AWS EC2...  
-----------------------------------------------------------------------------------------
How to schedule EC2 Start/Stop based on Tag using AWS Lambda ⏩    • How to schedule EC2 Start/Stop based ...  
AWS DynamoDB ⏩    • AWS DynamoDB | DynamoDB aws | aws Dyn...  
AWS IAM Role ⏩    • Create an AWS IAM Role for a user | C...  
AWS Lambda function ⏩    • AWS Lambda function | AWS lambda func...  

===========================================================
AWS lambda layers Step by Step Guide ⏩   • AWS lambda layers Step by Step Guide ...  
============================================================
Diffrent use case of AWS Lambda 👇

1✅ API Gateway to REST endpoint⏩    • How to trigger AWS lambda using API G...  
2✅ Event processing Lambda with SNS ⏩    • Trigger Lambda from SNS | AWS Lambda ...  
3✅ File upload processing AWS Lambda with s3 ⏩    • AWS S3 File Upload + Lambda Trigger -...  
4✅ Step function ⏩    • AWS Step Functions with Lambda Tutori...  
5✅ Serverless Cron Job scheduling ⏩    • How to schedule EC2 Start/Stop based ...  
6✅How to read a file from S3 with the Python SDK ⏩    • How to read a file from S3 with the P...  
7✅Trigger Lambda from SNS ⏩    • Trigger Lambda from SNS | AWS Lambda ...  

============ My other courses are available here ========= 👇
AWS Tutorial For Beginners ⏩    • AWS Tutorial For Beginning  
Azure Training Videos ⏩    • Azure Tutorial For Beginning  
AWS Free Tier ⏩    • AWS Free Tier 2023 | Tips to avoid bi...  
How to Create AWS Account Free in 10 Minutes ⏩    • How to Create AWS Account Free in 10 ...  


✅Don't forget to Subscribe to our Channel to learn more about cloud Technologies, Thank you:    / @cloudaws  

---------------------------
SSH into your EC2 instance using the default ec2-user

sudo adduser cloudtech

sudo usermod -aG wheel cloudtech

sudo su - cloudtech
mkdir .ssh
chmod 700 .ssh

touch .ssh/authorized_keys
chmod 600 .ssh/authorized_keys

vi .ssh/authorized_keys
Paste the public key into this file, save it, and exit the text editor.
--------------------------------------------------------------
sudo adduser cloudtech
echo "cloudtech:password" | chpasswd
sudo usermod -aG wheel cloudtech
sudo mkdir /home/cloudtech/.ssh
sudo chmod 700 /home/cloudtech/.ssh
sudo cp /home/ec2-user/.ssh/authorized_keys /home/cloudtech/.ssh/
sudo chown -R cloudtech:cloudtech /home/cloudtech/.ssh
sudo chmod 600 /home/cloudtech/.ssh/authorized_keys

-------------------------------------------------------------------------------------------


#aws #devops #devopsroles #cloudaws #awsdevops #awseni #awscertified
#awsdatabasemigrationservice #dms #on-prem #On-premises #datasync
#Boto3Course #certification #awscertifications #codecommunity #codecommit #migration #migrating #sourcecode #management #code #deploy #cli #awscli #termination #accidental #protect #protection #enable #devops #certification #cloudpractitioner
#cloudcomputing #tutorial #awsdemo #awsdevops Projecc #aws #PythonBoto3 #iam #security #awstoolkit #toolkit #pycharm #intelij #sam #sereverlessapplication #vpc #jumpbox #bastions #goodbye
#snapshot #amazonmachineimage #AMI #iam #accesskey #rotation #roadmap #awsroadmap #beginners