Hi@akhtar,
You can remove the ingress rule from your security group using the revoke-security-group-ingress tag. Use the below-given command in your AWS CLI.
$ aws ec2 revoke-security-group-ingress --group-name MySecurityGroup --protocol tcp --port 22 --cidr 203.0.113.0/24
I hope this will help you.