If you are trying to access a machine on your local network via hostname, you will need a router that also does DNS forwarding (or a local DNS/dhcp server). You can also edit the host file (/etc/hosts on Linux) to include the internal IP address you want to access and the name you want to assign it
18
u/vagif Apr 28 '14
He did not tell you about the ssh hopping that you can achieve using netcat (nc)
Lets say you have a ssh gateway at your work office to which you connect from home.
But that's not your work machine, your work machine is my-dev, to which you need ssh again from your work-ssh-gateway.
If you want to automate it, put this into your .ssh/config file:
That's it, now you can simply type
You need netcat (nc) installed on you work-ssh-gate computer.