Skip to content

Step 2 Connecting

jayofelony edited this page Jun 16, 2024 · 9 revisions

Preparation

In order to make the first connection to your Pwnagotchi we need to prepare your computer to know how to locate your Pwnagotchi. It supports OTG, which requires a data USB cable.

You now have an SD card with Pwnagotchi flashed onto it, put the SD card in the appropriate slot of your Raspberry Pi. If you have a Pi0W or Pi02W connect the micro USB side to the port closest to your HDMI port, and insert the USB-A side into your computer. The Pi3 will require a USB-A to USB-A data cable. If you have a Pi4 or Pi5 you can use the USB-C port to connect to your computer.

Alternatively if you use a Pi4/5 you can connect it with an ethernet cable to your internet modem or router and skip to #Connecting.

Windows

Linux

connecting-1.png

  • Open a terminal session
  • type ifconfig and write down the device name of your wireless/ethernet adapter. The Pwnagotchi usually gets a name that starts with en or usb0.
  • wget https://raw.githubusercontent.com/jayofelony/pwnagotchi/master/scripts/linux_connection_share.sh
  • sudo chmod +x linux_connection_share.sh (this will make it executable)
  • Edit the script as shown in the image above:
  • USB_IFACE will be the USB device name (notice the starting -.)
  • UPSTREAM_IFACE will be your internet adapter name (notice the starting -)
  • Leave the rest as is
  • Run the script: sudo ./linux_connection_share.sh

You should know that the connection might fail/disconnect a couple of times before it actually sticks. If it does fail repeat the last step. The device name will remain the same.

Every time you (re)connect your USB cable to the computer it will get a new device name.

MacOS

Connecting

I prefer SSH to connect as it will also stimulate me to learn how to use Linux commands and Linux OS in general. I hope you will also.

Connect to your Pwnagotchi with SSH

Default credentials are: pi/raspberry

Windows

  • Open cmd.exe or a PowerShell session.
  • type ssh <username>@10.0.0.2, <username> should be changed for either default username or the username you set in RPi Imager
  • Confirm the security message by entering yes
  • Enter the default password or the password you set in RPi Imager

If you are using a Pi4/5 and are connected with an ethernet cable, you can look up your device's IP and connect like this:

ssh <username>@<IP_of_your_pwn> or ssh <username>@pwnagotchi.lan

It will show a security message which you can confirm by typing yes.

And then enter your password.

Linux

  • Open a terminal session
  • type ssh <username>@10.0.0.2, <username> should be changed for either default username or the username you set in RPi Imager
  • Confirm the security message by entering yes
  • Enter the default password or the password you set in RPi Imager

If you are using a Pi4/5 and are connected with an ethernet cable, you can look up your device's IP and connect like this:

ssh <username>@<IP_of_your_pwn> or ssh <username>@pwnagotchi.lan

It will show a security message which you can confirm by typing yes.

And then enter your password.

MacOS

  • Open Terminal app
  • type ssh <username>@10.0.0.2, <username> should be changed for either default username or the username you set in RPi Imager
  • Confirm the security message by entering yes
  • Enter the default password or the password you set in RPi Imager

If you are using a Pi4/5 and are connected with an ethernet cable, you can look up your device's IP and connect like this:

ssh <username>@<IP_of_your_pwn> or ssh <username>@pwnagotchi.lan

It will show a security message which you can confirm by typing yes.

And then enter your password.

Previous: Installation Next up: Configuring your Pwnagotchi

Clone this wiki locally