Skip to main content

Tool to find ssh-able devices on your network.

Project description

Find SSH-able

Python application

Find SSH-able devices on your network and (optionally) add them to you ssh config in a cleanish way. Tested locally with MacOS and runs with Actions on Ubuntu.

Setup

  1. Install nmap

    MacOS

    brew install nmap
    

    Debian

    sudo apt-get install nmap
    
  2. (optional / recommended) create a python virtual env and activate it.

  3. pip isntall

    pip install find-sshable
    
  4. Run the program

    find-sshable --help
    

Testing

# pip install pytest
PYTHONPATH=. pytest -vs .

Headless Raspberry Pi

The idea is to stand up a headless raspberry pi that you can ssh into and do things on.

If you will run this on Wifi (not ethernet), start from here to configure the WiFi on your raspberry pi. However, if you can connect to ethernet, I would recommend doing so, and you can skip this step.

As per here add an empty ssh file to the root partition when you frist boot up.

Locally run the following. This will find and add your Pi to the local ssh config.

find_sshable --host-pattern "raspberrypi" --update-ssh-config --ssh-user "pi"
    scanning for devices... 00:15

    Found 2 devices...
    Host(name='raspberrypi.lan', ip=IPv4Address('192.168.86.20'))
    Host(name='raspberrypi.lan', ip=IPv4Address('192.168.86.36'))

    Devices will be added to your ssh config as follows
    find-sshable.raspberrypi.lan-0    192.168.86.20
    find-sshable.raspberrypi.lan-1    192.168.86.36

ssh into it,

ssh find-sshable.raspberrypi.lan-0

On there, you should change your password, update locale, etc

sudo raspi-config

Also ensure that ssh runs on start up

sudo systemctl enable ssh
sudo systemctl start ssh

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

find-sshable-0.0.2.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

find_sshable-0.0.2-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file find-sshable-0.0.2.tar.gz.

File metadata

  • Download URL: find-sshable-0.0.2.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for find-sshable-0.0.2.tar.gz
Algorithm Hash digest
SHA256 15aee8f1c82b1d8a486d75ff3c5290be6845382edde2fb6cb2d3082b06eaf0b8
MD5 b33372f03cae17e75da1d309d6ad9f4b
BLAKE2b-256 d2f9bbcde2f41be05853347f40c98f64a2b28a6e8b2a435d85a6f6a7cf2223eb

See more details on using hashes here.

File details

Details for the file find_sshable-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: find_sshable-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for find_sshable-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 646cbeb16d964f12495d447deb09a1501fc32ffeb0c9c082737b022f9bd80ef8
MD5 17e30e3da42983593eef65ceb031888b
BLAKE2b-256 be9964568c2bc40384f351252fa96cb51cb78188969aff9913df24f2b100bdc3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page