I think you get the gist by now that using ssh tunnels is pretty neat. What about accessing that webcam? Easy: Creating a SSH tunnel to my Webcam Accessing Pi-hole through the SSH Tunnel Lets access the pi-hole so I can unblock a false positive for the family: Creating a SSH tunnel to my ph-hole Accessing Pi-hole through the SSH Tunnel Accessing Synology NAS through the SSH Tunnel Now I browse to and a tunnel is created from port 9000 locally, through the tunnel where it then maps to inside my network. Ssh -L 9000:synology.localdomain:5000 Creating a SSH tunnel to my Synology NAS Device I find myself on a public wifi and I want to access it from there: Lets say I want to use this tunnel to connect to my synology NAS that is inside my home network which I usually access by typing synology.localdomain:5000 when I am in my house. These sweet things allow you to map a port on your local machine, the one you are sitting at, to anything inside your remote network at home. You want to be forwarding a port from your router to the internal IP address of your raspberry pi on port 22. Your router may have other dynamic DNS capabilities like dyndns built in though so you should check those out. I have used previously which will give you a nice name like which will point to the IP of your house. If possible it would be a good idea to setup somekind of dynamic DNS solution so you can access your home by name. Port forward port 22 from your firewall to your raspberry pi. PermitRootLogin no Configure the firewall Setting up sshįirst ensure your public keys are over on your server/pi by copying the contents of your ~/.ssh/id_rsa.pub file on your computer (mac in my case_ to the ~/.ssh/authorized_keys file on your pi.Ī super quick way to do this is use $ ssh-copy-id Ĭheck it works by ssh $ ssh if all works well without prompting for a password it's time to disable password authentication, this will prevent others accessing it by guessing your password/bruteforce or whatever. Note: I do have a VPN which is the primary entry point, but it's good to have another way in should VPN traffic be blocked by the network I am on or something goes wrong with the VPN software/certificates.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |