I am following this tutorial that explains how to use a VNC client to logon to an Amazon EC2 instance. After a few steps, it asks me to login to the instance using port forwarding using this command:
ssh -L 5902:localhost:5902 -i amazon.pem ubuntu@ec2–52–90–172–228.compute- 1.amazonaws.com
Afterwards I need to use a VNC client to connect to localhost:5902 (I have to use a password that I defined when setting up the VNC server on EC2). Now, I know nothing about security, but how safe is it to use port forwarding like this? What is the possible risk, if any?