Dear Diary,
Today was a good day. I learned about a powerful new feature called Port Forwarding!
Port Forwarding is a feature of SSH that allows you to redirect traffic from on a target machine to another using a specified IP and port. This is a powerful tool because it allows you to relay communication from a target machine to an external host (i.e. your computer!).
All you need is:
- SSH Credentials
- The port of the resource you want to access
Let's say the web server is hosted on 127.0.0.1:8443. You can use the command below to access that webserver:
ssh -L 8443:127.0.0.1:8443 <username>@10.10.10.184
Where you can now execute curl commands to retrieve information on that website (without port forwarding, this would've resulted in an access denied error!)
curl -k -i -u admin:<password> https://localhost:8443
Comments
Post a Comment