I have a Linux router(not used as DHCP/DNS server, simply a linux box on the network) at home that I want to use as my "remote access" device. My initial goal is to use SSH Tunneling to remotely access my network. For example, I can go to my (main) router's homepage from a remote location, simply from my web browser. However, I am not sure as to what SSH commands I need to run, and from where.
I can remotely execute SSH scripts from the Linux router. So creating tunnels at the remote location is not an issue. So, I can create a tunnel from a remote location to my local machine, but where do I go from there to access other parts of my network?
1 Answer
ssh -p 22 -i /home/path_to_privkey -L 12666:localhost:80 -l username xx.xxx.xxx.xxxThis command connects you to xx.xxx.xxx.xxx server, and binds your local port 12666 to the remote localhost port 80. So, if you type in your browser, the result should be the same as opening on the remote (xx.xxx.xxx.xxx) machine. Changing the 80 to any other remote port, allows you to access (almost) any other remote service. Keep in mind, the tunnel exists only as long as the ssh connection.
For a full access, I would suggest setting up a VPN connection.
3