I am not able to connect to private ec2 server using public ec2 server (both servers are of same VPC) in aws ? is there any restriction for that?
Please define what you mean by “connect to” and where you are trying to make the connection from.
Are you doing this in AWS playground?