I have just made an AWS ubuntu instance with a private key. I managed to connect to it through ssh, but I can't connect to it in web browser with localhost. I'm connecting through a windows computer and I want to connect to a ubuntu instance through the .pem key.
Command i used to connect in command prompt:
ssh -L 8080:localhost:8080 -i C:\Users\grege\keys\den_forsta.pem ubuntu@ec2-xx-xx-xxx-xx.eu-north-1.compute.amazonaws.com
Error messages that pop up repeatedly in command prompt when trying to connect through 'localhost:8080' in chrome browser:
channel 3: open failed: connect failed: Connection refused
and also
channel 4: open failed: connect failed: Connection refused
My security group in amazon AWS instance is: HTTP, HTTPS and ssh, and source for them all are set to 'anywhere'.
I have tried exchanging 'localhost' for 127.0.0.1 and read other solutions but it does not work. The solution can have to do with making key .ppk through PuTTYgen since it mentioned in the tutorial, but I can't figure out how, since they never mention it again.
I have tried opening port 8080 in firewall advanced settings and also added Custom TCP security rule that is open for port 8080.
Thanks a lot for answers. Ask if you need more info.