SeppeBudenaers / IoT_Technologie_PXL_2024

1 stars 0 forks source link

Remote SSH login #18

Open SamyWarnants opened 9 months ago

SamyWarnants commented 9 months ago

Epic : #11

SeppeBudenaers commented 8 months ago

installation

Install TailScale on PC:

  1. Download TailScale: Download the TailScale client for your PC from the official website.

  2. Install TailScale: Follow the installation instructions for your operating system.

  3. Set Up TailScale: Open a terminal or command prompt and run:

    tailscale up

    Log in using the same account you used on the Raspberry Pi.

  4. Check Status:

    tailscale status

    Verify that your PC is connected to the TailScale network.

    Install TailScale on Raspberry Pi:

  5. Update the Raspberry Pi:

    sudo apt update && sudo apt upgrade -y
  6. Download and Install TailScale:

    curl -fsSL https://pkgs.tailscale.com/stable/raspbian/buster.gpg | sudo gpg --dearmor -o /usr/share/keyrings/tailscale-archive-keyring.gpg
    
    echo "deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://pkgs.tailscale.com/stable/raspbian/buster raspbian main" | sudo tee /etc/apt/sources.list.d/tailscale.list > /dev/null
    
    sudo apt update
    sudo apt install tailscale
  7. Set Up TailScale:

    sudo tailscale up

    Follow the prompts to log in or create a new account.

  8. Check Status:

    tailscale status

    Make note of the Tailscale IP address assigned to the Raspberry Pi.

Remote ssh from PC to Raspberry Pi :

  1. Discover TailScale IP Addresses: On both devices, run:

    tailscale status

    Note the TailScale IP addresses of both the Raspberry Pi and PC.

  2. Access Raspberry Pi from PC: Use the TailScale IP address of the Raspberry Pi to SSH into it:

    ssh pi@<Raspberry_Pi_TailScale_IP>

    Replace <Raspberry_Pi_TailScale_IP> with the actual TailScale IP address.

Now, your Raspberry Pi and PC should be securely connected via TailScale, allowing communication between them. Adjust firewall settings if necessary to enable specific services.

SamyWarnants commented 8 months ago

Looks good to me!