Secure SSH Access to Your Raspberry Pi with Tailscale VPN - SSH From Any Network Easily

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] what's up everyone welcome back to the channel and today's quick tutorial I'll be showing you how to SSH into your raspberry pie from any external network or device using a free VPN service called tail scale now the reason I'm making this video is because in a previous video which I'll link right here and in the description down below I actually showed you how to do exactly this which is to control your Raspberry Pi from an external network however in that video we got much more in-depth and it was a little more advanced because we were able to do it by playing with some of the settings in our router and we were able to configure some parameters to enable us to SSH from an external network which turned out to be complicated from for some beginners and actually doesn't generalize well because some people's routers in fact many people's routers and providers are much more different so people following along with that tutorial probably got confused at some point so instead we'll be using this free VPN service which will give us the same outcome so we'll be able to control our Raspberry Pi remotely and this method is much more user friendly and has much less overhead and less configuration for the same outcome so I do not want to waste any your time guys let's jump into the Raspberry Pi side of things and get started but before we get into the content for today's video everyone I just gently want to remind you guys to subscribe to the channel if you haven't because it is with your continued support and energy towards the channel that allows me to continue making more engaging content for the iot community so if you haven't already please be sure to smash that subscribe button and let's get into the video okay so first things first I'm going to show you how incredibly simple this is to do we just want to sign into our Raspberry Pi and we just want to open a terminal you could do that on the top left here now in the terminal this what is what allows us to install third party packages really easily through a command line interface on a Raspberry Pi so if you are a beginner you're going to be using the terminal a lot when you are programming on your Raspberry Pi so once we're in this terminal we just want to first of all do a couple of commands so if you are on the terminal you could just you could just type up and down on your keyboard to see the previous commands now the First Command we want to run today is the upgrade command so we just want to upgrade the app installer on our device so this is just good practice to do before you actually start a new project is to upgrade and update everything so we want to upgrade and we want to update so pseudo appt update now if you haven't run this command for a long time it will take a while to run so I already ran this right before this video so as you can see it's fairly quick so we updated everything so everything looks good next we just want to to add the repository for tail scale on our Raspberry Pi so I have some commands once again I'm just clicking up on my keyboard because I already ran these commands earlier so this is the first curl command so curl is just pretty much like hitting an API to get their repository on our device so we could just curl that so we're just going to add that and we have another curl command here we're not going to get into too much of what these commands are doing I'll link them in the description Down Below in my blog so you can just copy and paste them because they are quite intricate commands or to type in at least so we curled the repository on our device in a sense and now finally what what we want to do is we want to install actual tail scale after we curled so now we could just go ahead and run the pseudo app install tail scale so what we did was we updated we curled the repository and then we just want to install tail scale so we could go ahead and do that with pseudo app install so very seamless so far and then finally once we install tail scale which is fairly quick we can just go ahead and actually just run tail scale by running pseudo tail scale up so now we should have tail scale running on our rasp Pi if we did everything correctly nice now the next thing we want to do is we want to authenticate our device via the tail scale uh login so we're going to have to open this in a browser which will jump into our local computer because it's just faster for me to do that on a video to go through this link and authenticate our Raspberry Pi to enable VPN service for it okay so I'm just going to go ahead and open the authentication link on my local computer so I'm on my Mac now really you could have just opened this link on your Raspberry Pi so give it a moment to authenticate there if it's your first time it will have asked you to sign in so go ahead and sign in with any way you'd like I use Gmail and you can see here it looks like it authenticated the device successfully so so we should be good on the Raspberry Pi side of things now keep this IP address for later Next Step here it's telling us to install tail scale on the the App Store so just go up and actually do that so let just go to the App Store and install it real quick so I actually don't have this yets on my Mac so we could just go ahead here and of course they have ones for Linux windows and more so we go ahead and just search tail scale and I am going to get tail scale and I'll just give that a moment to install so we'll jump back to the segment of the video when it is done installing okay looks like tail scale is done installing so let's go ahead and get started here with tail scale allow VPN configuration we'll just allow that okay join Network next connect this device to your network by signing into tail scale and authorizing it so that is fine go ahead and do that once again I'll just sign in with my Gmail account that I used at the beginning here so we go ahead and connect awesome so it looks like we are connected so automatically start tail scale when you log into computer yes start on login that is fine okay connect your devices now you're connected you can find your network devices in the meni bar and connect to them using their IP addresses start using tail scale visit the admin console so let's open the admin console here as we can see so we actually have these devices let's go ahead and actually try to SSH into this device so we go ahead and select it here so we see some parameters we're not going to get into too much detail about this let's go ahead and just copy this tail scale AP uh VPN or this uh IP address now let's go ahead and open the terminal on our Mac we should be able to now SSH so let's just do SSH the name of my username on the Raspberry Pi and let me just sign in for you guys a little bit at the IP address let's go ahead and click enter and now it's going to ask us if we want to connect so we'll go ahead and type in yes and it looks like we want the password now so I'll just type in my password for my Raspberry Pi and now I am SSH into my Raspberry Pi now the next thing I want to do is I was actually on the same network as my Raspberry Pi so let's go ahead and disconnect and make sure this works from an external network because the whole premise of this video was to show you how to control your Rasberry Pi from external networks which is a little harder than controlling it from your local network so let's go ahead and switch to my Hotpot and show you that I'm not joking it's that easy to set this up so now I'm on a Hotpot I'm on an external network we can go ahead and run the same command for our Raspberry Pi and just sign in and we can run commands on our Raspberry Pi remotely and we saw how incredibly simple it was to set that up using tail scale so that sums it up for today's video everyone now we can remotely control our Raspberry Pi with any device that has tail scale on it best of all it's free easily configurable and really beginner friendly and also has many other configurations you could do for more advanced things and production level applications so now we can control it as you can see here and I hope you guys can as well now if you had any issues is following along with this tutorial let me know in the comment section down below also let me know what you want to see in future tutorials in the comment section down below stay tuned guys do not forget to smash that subscribe button or that like button and I will see you in the next tutorial [Music]
Info
Channel: Shilleh
Views: 870
Rating: undefined out of 5
Keywords: ssh, tailscale, vpn, raspberry pi, raspberry pi ssh guide, pi, raspberry pi vpn, ssh raspberry pi, raspberry pi vpn tutorial, tailscale raspberry pi
Id: v89agfBZIoc
Channel Id: undefined
Length: 7min 52sec (472 seconds)
Published: Thu May 16 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.