How to Setup a Raspberry Pi and Access it Remotely! (Headless setup)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey welcome back Ben again today we're taking a quick look at how to set up a new Raspberry Pi and access it remotely so we're going to need two things we're going to need your Raspberry Pi and we're also going to need a Micro SD card at least 32 gigs in size I mean it probably could go smaller about 32 is the basic and what else we're going to need is the Raspberry Pi OS imager from the Raspberry Pi website and I'll have this link down below also and what this is going to do it's going to be able to create the Raspberry Pi operating system that we need so when you download it you're going to get this nice little uh imager tool here so I'm just going to choose my storage so this is my micro SD card card that I have in my reader and I'm going to choose my operating system what's nice is that you can actually choose other operating systems like if you go under here you can do other they have other Raspberry Pi ones and other general purposes you can have like Ubuntu and you can do other ones but for this purpose we're just going to do straight up raspbian which is kind of like the default of this so we're gonna do that and to make our lives easier we're going to do this little gear down here for the settings and in here you can actually set up a lot of your Raspberry Pi before even having to log into it so it's really nice to be able to set up your internet access because it's going to be able it's going to be getting remote access much easier if we do that so I'm going to set a hostname here the default is Raspberry Pi but I have a couple different Raspberry Pi's on my network so as to not confuse them I'm going to uh make something else so we're gonna do it like uh video so my hostname will be video which will look a little funky but you can have yours be whatever you want so what we want is to enable SSH this is what's going to allow us to get into our PI remotely to begin the setup and we're going to use uh use password authentication and for the username and password we're going to set up a username and a password of course so I'm going to keep my username Ben and I'll have my password also be Ben just why not and now we also want to do configure wireless LAN if you're not setting up your Raspberry Pi to use ethernet right away this is also very useful because it will be able to connect to the internet your local Wi-Fi automatically without you having to go into it which is super nice so the SSID is going to be the name of your network and then you can do your password so I'm actually going to hide both of these okay so it turns out you can't actually hide the SSID on screen so I'm just going to scroll down here but I promise all I did was put in my the SSID and the password for my Wi-Fi so then down here the wireless LAN country you just want to set it to your local uh code from the United States and looks like I can't type it in so I'm just going to scroll all the way down to the United States wow there's a little bit of a laggy menu there's a lot of different country codes you might have to look up your country code as some of them are not super obvious but luckily for the one for United States it's just us come on girls girls very slow okay there we go us and we can see uh we can set the Locale settings too this time zone is correct for me so I'm not going to touch that and then we just have some extra settings down here oh you don't have to mess with these if you want but I like to just have the media eject when finished so I'm just going to save that and I still have my uh flash drive or sorry my SD card in here and that's all we need to do and so I'm just going to hit right and it is going to erase anything you have on the SD card so make sure you're using a blank one or one you don't mind removing the data from and I'm just gonna let this run this will take a few minutes because it's got a railroad operating system but I'll see you guys back here when this is done okay looks like we're done writing that to the uh micro SD card I'm gonna hit continue here and I'm gonna go pull my SD card out of my computer and now that I have my card I'm going to put it into my Raspberry Pi and Power It Up okay I have my pie off to the side of my desk and it is booting up so it probably will take a minute or so the first time you uh start it up but we're gonna see if mine is ready so the first thing we're going to do to get into it is that we're going to open up a command prompt so let me bring that over here and what I'm going to do is that we need to SSH into our pie so to do that we can simply say SSH and then we're going to use the username and the host name that you set up so if you're using the default settings yours are probably going to be Pi at raspberry whoops whoops again like that but for me I did Ben at video some new Ben at video just like that so it's the username at the hostname so we're gonna hit enter mine should probably be booted up by now Yep looks like my knight might not be ready so let's try again in a second okay there we go just took a second for it to fully Boop up boot up sorry so I was going to show you some things if you've never connected before it's going to tell you that it doesn't know this device it doesn't know like the authenticity of it in the key but since this is our own device we're going to say yes and it's going to add that um this new device to our list of SSH hosts which is stored in your computer so this is going to ask you for your password and I believe I just said mine was Ben and there we go we're in so I was going to spit out some stuff about Linux blah blah blah but we're gonna see now uh we're now at Ben at video and now we're inside of our pie so we could do something like LS and you're gonna see that we're now inside of our pie and we're running Linux this is the raspbian cool so we're now technically rooted in and we do have remote access this is running on the local network but since this is a small computer most people probably want to see the operating system or the GUI so to set that up we're actually going to do something called VNC and that's going to let us connect to our PI uh remotely through the cloud actually and it's going to give us a visual of the uh the pie so what we're going to do we're going to say sudo raspi one word Dash config like that and we're going to get this nice bright blue menu setting feel free to play in here about without their settings you want but for right now we're going to go down to interface options and just FYI you use the arrow keys and the enter key here so I'm gonna say this I'm going to go to VNC and we're going to say yes just like that and the VNT server is enabled we're going to say okay and we're going to finish awesome now we need to be able to connect to the end we need to get into our uh Raspberry Pi visually with the VNC before we can add it to our account that is one thing you might want to do is add an account uh so what I would recommend going to the VNC website which I'll link down below and downloading the VNC viewer so I'm going to open up mine here so you can see I have some other pies that I use so if you have a team this is going to be uh the ones that you store and your cloud account but for now we're just going to use our address book and we're gonna go up here we're gonna do new connection and the host name is video for you it might be Raspberry Pi so we're going to hit OK I'm gonna see if this works we're gonna double click on that and all right looks like we're getting in so again this one is very new so it's going to verify so we're going to say continue and then it's gonna want the username and password so for me that's then in bed we're gonna hit okay and it looks like we cannot currently show the desktop so we might have to work around this one let's pull that back out these ones are probably okay what you probably need to do is go back into that uh settings that we had and activate the screen because sometimes it does not do that so let's go back into uh our SSH terminal here so we're going to say pseudor raspy config again let's go to display options we're going to say VNC resolution we might just have to force this one we'll say 800 by 600 just like that you can finish this okay it's going to want us to reboot okay let's check back in a second when we are all booted up back up okay so my Pie has rebooted you see me messing back I'm trying to get back in here so we are back in and you can see I did grab in here real quick and you can see that we are now able to get into our Raspberry Pi if I put in my password and there we go here's our graphical interface nice so it looks like setting that uh Force resolution did work for us but if that does not work for you in the command line you can say VNC server and if you run that that'll kind of kick start it off and it'll also print out an IP address and you might have to directly connect to that one instead of putting in uh our host name but otherwise let's try setting in the pseudor raspy config the VNC and then set the resolution and you should be okay and you don't have to use the same resolution I did if you don't if you want this to be bigger like actual 1080p you can go ahead and do that but for this purpose I just did 800 by 600 and yeah that's really it we are now in here if we go into VNC here you can see this is our local IP address and we're just going to sign in with an account if you go over here you can sign in to enable Cloud connectivity that's actually completely optional you don't have to if you don't want to but here you can sign in all you have to do is sign in or make an account on the VNT website which I will again Link in the description below and this is if you just want to have it as part of your Cloud connections like uh your book I'll show you back here so these ones are just other pies that I've had like in your team per se these are your Cloud connections and these are computers you can access from anywhere you don't have to be on the same Wi-Fi so I find that very useful but again that's optional but otherwise that's all you need to do to get your pie up and running we now have a graphical interface into our Raspberry Pi so that's it if you have any questions please leave them down below I'll try to answer all of them as I know not everybody experiences the same install experience because that's just how computers work sometimes so I'll be down there trying to answer questions but otherwise I hope you guys enjoyed and I'll see you in the next one see ya [Music]
Info
Channel: Lazy Tech
Views: 50,344
Rating: undefined out of 5
Keywords: raspberry pi, headless, remote access, ssh, vnc, python, software engineering, how to, Lazy Tech, new pi, tensorflow, no monitor, raspi, raspberry pi 4b, sftp, Raspberry pi 5, Pi5, Pi4
Id: m6aS9YF-0xo
Channel Id: undefined
Length: 12min 3sec (723 seconds)
Published: Fri Jul 21 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.