Remote Access with SSH and Remote Desktop - Raspberry Pi and Python tutorials p.3

sentdex · Beginner ·🛠️ AI Tools & Apps ·9y ago

Key Takeaways

This video tutorial covers remote access to Raspberry Pi using SSH and Remote Desktop, including enabling SSH, installing xrdp, and connecting via Windows and Linux.

Full Transcript

what's going on everybody and welcome to another Raspberry Pi tutorial in this tutorial what we're going to be talking about is accessing your Raspberry Pi remotely from your local network you can access your Raspberry Pi from anywhere in the world you can set that up but that has a lot less to do with the Raspberry Pi itself and more to do with your actual Network and that's a much more advanced tutorial we're not going to be getting into that so uh there's two major ways to connect to your Raspberry Pi one is via some sort of remote desktop and the other is via just SSH which is secure shell both have their own good benefits to them so you would do like a remote desktop if you have any sort of uh UI or if you've got video that you want to show or you just don't you you want to actually just share um the the keyboard and mouse on some computer between the Raspberry Pi and all that you don't want to have to hook it up every time so um the first thing that we need to do to remotely access the pi is make sure we were connected in some way to the local net networ you can come up here to your Wi-Fi click on that um you can't see it actually cuz my face is in the way there uh you can um choose your uh Wi-Fi make sure you're connected or you can connect you know physically with an ethernet cable or whatever now once you've got that go ahead and do control alt and T and that should open up a um your terminal now I want to make it a little larger so everybody you can see and hopefully that's not too large let's see what we get ah not bad so um so now we're going to go ahead and do is uh you can do if config and that will give you a bunch of information if you are connected um physically it would probably your internet IP address would be up here um but I am not connected physically I'm actually connected via Wireless slan so that's down here and what you're looking for is your inet address my address is 1926 local address 192 168 0103 okay so we have that information now uh what we want to do is let's see if I can get to the bottom of this I've clearly made this too big Let's uh go down a little bit um once we've done that once we have that we could in theory connect to the Raspberry Pi but it's not going to let us because the SSH server is disabled by default now on the Raspberry Pi if you have an older Raspberry Pi um actually I suppose it would come with the installation so like your actual operating system so it used to be the case that SSH was always just enabled by default but as more and more people are using raspberry pies they're using them in their businesses and all that um it has become a better idea to not do that because if people got an open wi-fi they just need to find the Raspberry Pi's IP address they know the default login and password so that can be problematic so generally if you do have the SSH server enabled and you're using the default username and password is going to keep warning you by the way you're doing this that's stupid anyway we're going to open up the raspy config so do pseudo maybe H I'm still not on screen I don't think let's see if I can uh do this I think we're just typing off screen yeah so what you want to do is pseudo raspi-config hit enter and this is the configuration for your Raspberry Pi you can do a whole bunch of stuff you can change the password you can uh change your host name you can do boot options we're interested in interfacing options so go ahead and enter there and we want to enable SSH so go ahead and enter here and would you like the SSH server to be enabled yes boom done okay so now SSH is enabled um and we can connect so at this point we actually can connect via SSH now if you aren't familiar with SSH we'll hit finish um basically on Windows you're going to need something like putty so P TTY you can go to putty. org um download that and you can connect that way or if you're on Macintosh or Linux it's as simple as opening up your terminal and doing SSH username which would be Pi at whatever your IP address is in my case it was 192 168 0103 so you can do that and connect now if you're on Windows it's a little more challenging um oops I've already got this one's already up but uh basically let's do new session um you'd come over here and you'd type in the IP address so 192 168 0103 hit enter this will pop up asks you to log in all login is pi password is Rasberry by default connected and boom and as you can see um SSH is enabled and the default password for pi has not been changed blah blah BL and the next time we log into the actual gooey desktop we'll also have another warning there telling us that we're we're probably making a big mistake so um okay so that's how you can SSH into the Raspberry Pi once you do that it's basically the command line as you can see and so now we can do all kinds of stuff here once you've done that um like I was saying before there are going to be times where you want a gooey desktop for whatever reason so you can also do a remote desktop now for this on Windows and Mac you probably the easiest is just to download remote desktop by Microsoft I think Mac also has a remote desktop software I'm not sure um and then on Linux it's gr desktop so guey remote desktop gr desktop so that would be gr desktop like so otherwise if you're on Mac or Windows it's uh virtual or I'm sorry it's remote desktop by Microsoft Microsoft okay if you're on Windows you should already have it now in order to get there what we need to do is install some sort of remote remote desktop client on the Raspberry Pi I choose xrdp if you have um already tried to install xrdp and it failed for whatever reason in the past it was easier now it's harder for some reason because you already have a VNC server you might need to run pseudo app get remove xrdp VNC for server and tight VNC server if you've already tried to install um you might need to run that command just to remove everything and start clean otherwise if you are clean um you should be able to just do pseudo apt get install tight VNC server [Music] server now I already have it so it should be done and then you can do pseudo app get install xrdp if for whatever reason something gets uh when when you go to connect and it doesn't work for whatever reason it hangs or whatever um go ahead and run that thing to to just clear everything and try again so once you've got xrdp installed you're good to go you you could restart the service xrdp but it should be enabled by default once you install now on Windows what you can do is um open remote desktop and in here you can type the IP address I'm actually 103 hit connect um yes and then here's your like your login screen now you can type Pi raspberry hit enter and if you hang here that's probably when you'll want to do your uh you know remove everything and try again otherwise here we are in the remote desktop now because I already have a remote desktop um it's just showing me like a copy of this other one um because this is also a remote desktop connection but normally you won't share like so this is not on the screen on the actual Raspberry Pi and I can even turn it on and show you that that is not showing you know this stuff here and if you are on a remote desktop and you're trying to show uh something from the RAs by camera by default it's actually going to show on that screen I'm not positive if you unplug the HDMI if it would work but anyway um no big deal but just know sometimes it can be kind of screwy anyway um that's it for the remote desktop and remote connection SSH all that fun stuff if you're having a problem you got questions uh whatever feel free to leave them below otherwise I'll see you in the next tutorial where we're going to be talking about actual terminal navigation and commands and all that kind of stuff so I will see you in the next tutorial

Original Description

In this Raspberry Pi tutorial, we're going to cover how we can remotely access our Raspberry Pi, both with SSH and with a remote desktop client. We want to eventually be able to remotely access our Raspberry Pi because much of the "value" of the Raspberry Pi is its size, and that it can be put in a variety of places that we might not want to have a keyboard, mouse, and monitor attached to it at all times and we probably don't want to have to carry over all of this stuff when we do want to access it. Text-based version of this series: https://pythonprogramming.net/introduction-raspberry-pi-tutorials/ https://twitter.com/sentdex https://www.facebook.com/pythonprogramming.net/ https://plus.google.com/+sentdex
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from sentdex · sentdex · 0 of 60

← Previous Next →
1 Matplotlib Python Tutorial Part 1: Basics and your first Graph!
Matplotlib Python Tutorial Part 1: Basics and your first Graph!
sentdex
2 Python Encryption Tutorial with PyCrypto
Python Encryption Tutorial with PyCrypto
sentdex
3 Python's Logging Function
Python's Logging Function
sentdex
4 wxPython Tutorials 1: Making Windows GUIs with Python : Installing + 1st window!
wxPython Tutorials 1: Making Windows GUIs with Python : Installing + 1st window!
sentdex
5 wxPython Tutorials 2: Making Windows GUIs with Python: Customizing Window Parameters
wxPython Tutorials 2: Making Windows GUIs with Python: Customizing Window Parameters
sentdex
6 wxPython Programming Tutorial 3: Menu Bar and Menu Button
wxPython Programming Tutorial 3: Menu Bar and Menu Button
sentdex
7 wxPython Programming Tutorial 4: Panels
wxPython Programming Tutorial 4: Panels
sentdex
8 wxPython Programming Tutorial 5: User Input Saved To Variables
wxPython Programming Tutorial 5: User Input Saved To Variables
sentdex
9 wxPython Programming Tutorial 6: Multiple Choice Input
wxPython Programming Tutorial 6: Multiple Choice Input
sentdex
10 wxPython Programming Tutorial 7: Adding Static Text and Colors
wxPython Programming Tutorial 7: Adding Static Text and Colors
sentdex
11 wxPython Programming Tutorial 8: Custom Button Images
wxPython Programming Tutorial 8: Custom Button Images
sentdex
12 wxPython Programming Tutorial 9: Tool Bar Items and Sub Menus!
wxPython Programming Tutorial 9: Tool Bar Items and Sub Menus!
sentdex
13 Basic PHP Tutorial 13: Multi-dimensional Array
Basic PHP Tutorial 13: Multi-dimensional Array
sentdex
14 Basic PHP Tutorial 15: Functions and Global Variables
Basic PHP Tutorial 15: Functions and Global Variables
sentdex
15 Basic PHP Tutorial 12: Associative Array
Basic PHP Tutorial 12: Associative Array
sentdex
16 Basic PHP Tutorial 14: Foreach loop
Basic PHP Tutorial 14: Foreach loop
sentdex
17 Basic PHP Tutorial 16: Include and Require
Basic PHP Tutorial 16: Include and Require
sentdex
18 Basic PHP Tutorial 7: Assignment, comparison and Logical operators
Basic PHP Tutorial 7: Assignment, comparison and Logical operators
sentdex
19 Basic PHP Tutorial 4: Variables and Comments
Basic PHP Tutorial 4: Variables and Comments
sentdex
20 Basic PHP Tutorial 11: Arrays part 1, basic array
Basic PHP Tutorial 11: Arrays part 1, basic array
sentdex
21 Basic PHP Tutorial 6: If else and else if conditionals cont'd
Basic PHP Tutorial 6: If else and else if conditionals cont'd
sentdex
22 Basic PHP Tutorial 1: Intro to PHP
Basic PHP Tutorial 1: Intro to PHP
sentdex
23 Basic PHP Tutorial 3: HTML with PHP
Basic PHP Tutorial 3: HTML with PHP
sentdex
24 Basic PHP Tutorial 9: While Loop
Basic PHP Tutorial 9: While Loop
sentdex
25 Basic PHP Tutorial 10: Switch Statement
Basic PHP Tutorial 10: Switch Statement
sentdex
26 Basic PHP Tutorial 2: Print and Echo
Basic PHP Tutorial 2: Print and Echo
sentdex
27 Basic PHP Tutorial 5: If else and else if conditional statements
Basic PHP Tutorial 5: If else and else if conditional statements
sentdex
28 Basic PHP Tutorial 8: Arithmatic Operators: Doing math with php
Basic PHP Tutorial 8: Arithmatic Operators: Doing math with php
sentdex
29 Basic PHP Tutorial 17: User Input Form Example / String Manipulation
Basic PHP Tutorial 17: User Input Form Example / String Manipulation
sentdex
30 Basic PHP Tutorial 18: HTML Entities and forms cont'd
Basic PHP Tutorial 18: HTML Entities and forms cont'd
sentdex
31 Basic PHP Tutorial 19: Finding words in strings
Basic PHP Tutorial 19: Finding words in strings
sentdex
32 Basic PHP Programming Tutorial 20: Saving to a File / writing and appending
Basic PHP Programming Tutorial 20: Saving to a File / writing and appending
sentdex
33 Basic PHP Programming Tutorial 22: Hashing part 2: salting
Basic PHP Programming Tutorial 22: Hashing part 2: salting
sentdex
34 Basic PHP Programming Tutorial 23: Variables in Strings and tokenizing
Basic PHP Programming Tutorial 23: Variables in Strings and tokenizing
sentdex
35 Basic PHP Programming Tutorial 21: MD5 Hashing For Security
Basic PHP Programming Tutorial 21: MD5 Hashing For Security
sentdex
36 Basic PHP Programming Tutorial 24: String similarity
Basic PHP Programming Tutorial 24: String similarity
sentdex
37 Basic PHP Programming Tutorial 25: Time and Time stamps
Basic PHP Programming Tutorial 25: Time and Time stamps
sentdex
38 Basic PHP Programming Tutorial 26: Die and Exit
Basic PHP Programming Tutorial 26: Die and Exit
sentdex
39 Basic PHP Programming Tutorial 27: MySQL Databases Part 1
Basic PHP Programming Tutorial 27: MySQL Databases Part 1
sentdex
40 Basic PHP Programming Tutorial 28: MySQL Database Part 2: Reading From Database
Basic PHP Programming Tutorial 28: MySQL Database Part 2: Reading From Database
sentdex
41 Basic PHP Programming Tutorial 29: MySQL Database Part 3: Inputting Data
Basic PHP Programming Tutorial 29: MySQL Database Part 3: Inputting Data
sentdex
42 Basic PHP Programming Tutorial 30: MySQL database in Use
Basic PHP Programming Tutorial 30: MySQL database in Use
sentdex
43 Django Tutorial Web Development with Python Part 1: Installing Django
Django Tutorial Web Development with Python Part 1: Installing Django
sentdex
44 Python Tutorial: File Deletion and Folder Deletion / directory deletion
Python Tutorial: File Deletion and Folder Deletion / directory deletion
sentdex
45 Python Tutorial: How to Rename Files and Move Files with Python
Python Tutorial: How to Rename Files and Move Files with Python
sentdex
46 3D Graphs in Matplotlib for Python: Basic 3D Line
3D Graphs in Matplotlib for Python: Basic 3D Line
sentdex
47 3D Plotting in Matplotlib for Python: 3D Scatter Plot
3D Plotting in Matplotlib for Python: 3D Scatter Plot
sentdex
48 3D Charts in Matplotlib for Python: Multiple datasets scatter plot
3D Charts in Matplotlib for Python: Multiple datasets scatter plot
sentdex
49 Sikuli Tutorial 1: Visually programming in python!
Sikuli Tutorial 1: Visually programming in python!
sentdex
50 Sikuli Tutorial 2: Program visually in python!
Sikuli Tutorial 2: Program visually in python!
sentdex
51 Sikuli Tutorial 3: Program visually in python!
Sikuli Tutorial 3: Program visually in python!
sentdex
52 3D Bar Charts in Python and Matplotlib
3D Bar Charts in Python and Matplotlib
sentdex
53 3D Plane wire frame Graph Chart in Python
3D Plane wire frame Graph Chart in Python
sentdex
54 Raspberry Pi Part 1 Introduction
Raspberry Pi Part 1 Introduction
sentdex
55 Raspberry Pi Part 8: First Download and Update! (Firmware)
Raspberry Pi Part 8: First Download and Update! (Firmware)
sentdex
56 Raspberry Pi Part 10: How to set up a Linux Web Server on your Pi
Raspberry Pi Part 10: How to set up a Linux Web Server on your Pi
sentdex
57 Raspberry Pi Part 11: Remote Desktop
Raspberry Pi Part 11: Remote Desktop
sentdex
58 Twitter Analysis: How to rank a user's influence
Twitter Analysis: How to rank a user's influence
sentdex
59 GPIO Tutorial for Pi Part 2 - Programming the GPIO
GPIO Tutorial for Pi Part 2 - Programming the GPIO
sentdex
60 GPIO Tutorial for Raspberry Pi Part 1 - Setting up
GPIO Tutorial for Raspberry Pi Part 1 - Setting up
sentdex

This tutorial teaches how to remotely access a Raspberry Pi using SSH and Remote Desktop, enabling users to control their device from another computer.

Key Takeaways
  1. Connect to local network
  2. Enable SSH
  3. Install xrdp
  4. Connect via SSH using Putty or terminal
  5. Connect via Remote Desktop
💡 Enabling SSH and installing xrdp allows for remote access to the Raspberry Pi, but requires careful configuration to ensure security.

Related Reads

Up next
I Found FREE Versions of EVERY Paid AI Tool (only top 1% Know this)🔥
Damini Tripathi
Watch →