Git Product home page Git Product logo

ad-hoc-ssh's Introduction

Ad-Hoc SSH over HostAPd

INTRODUCTION ๐Ÿ’ฌ

This lets you create a WiFi Hotspot for your linux system without internet connection to access by just connecting to its WiFi AP.
You can get internet by bridging your adapter to another with internet.
(I have part of the code needed for this in my RogueAP repository) :neckbeard:

BACKGROUND ๐Ÿ‘ป

I wanted to easily carry my Raspberry Pi anywhere without the hassle of having to carry a screen or a keyboard.

So I searched for a way to connect my phone to it via SSH but without being connected to a WLAN, because that means I would have to stick to places where I have the Password or an ethernet connection.

The final way was HostAPd, a program that let's you do exactly this.

The installation of everything is a bit tedious so I just automatized it.

INSTALLATION ๐Ÿ“ƒ

I made the project thinking on Raspbian because it's easier to set up (Raspi-Config) and because you can get every tool you need by just adding repositories (like the Katoolin to get Kali tools). Tested on Raspbian Buster (v. February 2020).

In case of going for Raspbian, install the buster lite option with console login as it need much less space and runs faster.

What you need:

  • If you just recently installed your OS:

    • Configure your locales and keyboard layout ๐ŸŽน

    • Configure your password and hostname ๐Ÿ‘ค

  • Get internet connection (just for installation) ๐Ÿ“ถ

  • Enable SSH

  • Enable autologin

  • Install: ifconfig, awk, grep, systemctl and iptables.

The installation is as simple as:

git clone https://github.com/n0nuser/Portable-HostAPd.git
cd Portable-HostAPd
chmod +x setup.sh

USAGE ๐Ÿ“ฑ

โ— The Internet adapter you use will only have this purpose, which means that:

  • If you setup the AP you will be able to connect to it but only control it with SSH
  • This will leave you without internet access (unless you bridge it with other that has)
  • If you then connect to a WiFi, but are connected to the system via the AP, you'll lose connection.

Just run:

sudo ./setup.sh SSID PASSWORD

And there you go! :rage3:

You're most likely won't use the screen and the keyboard again.

USES ๐Ÿš™

The best case that gets to my mind is wardriving or just collecting data from the environment.

If you have other uses in mind, please post an Issue or contact me so I update the readme!

TROUBLESHOOTING ๐Ÿ”ซ

If your AP doesn't appear, it might be because:

  • Some service didn't fully installed. In this case erase all the redirections to /dev/null and watch where it crashes.
  • The driver of the WiFi adapter is not the usual Broadcom. In that case, search which driver does your adapter need and change it into: /etc/hostapd/hostapd.conf.

If the AP appears but doesn't let you connect to it, it will probably be the DHCP which is not assigning you an IP, so revise that dhcpcd service is using the file created/modified: /etc/dhcpcd.conf.

ad-hoc-ssh's People

Contributors

n0nuser avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.