I had to access a webservice running on a port I didn't open to the firewall I have setup, but I did have SSH enabled and the port forwarded to the machine I needed to access the webservice on. Very long story short, if you would like to access the port on another machine through SSH, you can bind it to a local port and then login. On my elementary OS laptop I executed the following:
ssh -L localport:internalipaddress:internalport sshusername@externalip
where localport is the port I want to bind to, the internalipaddress and internalport are the internal ip address and port I want to forward to and sshusername@externalip is my SSH credential for login. For example:
ssh -L 8112:192.168.1.120:8080 mysshuser@65.48.151.174
binds the local port 8112 to look like you're accessing requests from 192.168.1.120:8080.
No comments:
Post a Comment