Skip to main content

python package to send its own IP to another machine through ssh

Project description

Send IP

Python software to configure machines for sending their IP through ssh.

Installation

Run the following to install:

pip3 install send_ip

Usage

  1. Edit the config.yaml file to match your destination. These fields will be used to scp into the target machine (user@ip:port using password pass to login).
user: target-user
ip: ip-address
pass: target-password
port: target-port #default port is usually 22 
remote-path: target-folder # this folder will be created under /home/user might create errors for not linux users
refresh-freq: 15 # minutes for cron-job
  1. Use the pacakge functions, for example:
from send_ip.send_ip import *

info_file = create_info()
send_info(info_file)

You can save this into a send_ip_script.py and schedule this task to run automatically (see below)

Schedule task

Chron

Windows machines

Please refer to this example and file issues if having trouble.

For developers of send_ip

To install send_ip and tools needed for tests, you can install into a virtualenvironment like so:

pip install -e .[dev]

Known issues

For a Raspberry pi installation, you might face this issue:

          =============================DEBUG ASSISTANCE=============================
          If you are seeing a compilation error please try the following steps to
          successfully install bcrypt:
          1) Upgrade to the latest pip and try again. This will fix errors for most
             users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
          2) Ensure you have a recent Rust toolchain installed. bcrypt requires
             rustc >= 1.56.0.
      
          Python: 3.9.2
          platform: Linux-5.15.56-v7l+-armv7l-with-glibc2.31
          pip: n/a
          setuptools: 65.5.0
          setuptools_rust: 1.5.2
          rustc: n/a
          =============================DEBUG ASSISTANCE=============================
      

You might need:

sudo apt-get install build-essential cargo

You can also refer to this info in bcrypt.

You might also need to install or upgrade rustc

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

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

send_ip-0.0.8.tar.gz (6.4 kB view details)

Uploaded Source

File details

Details for the file send_ip-0.0.8.tar.gz.

File metadata

  • Download URL: send_ip-0.0.8.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for send_ip-0.0.8.tar.gz
Algorithm Hash digest
SHA256 08e3bf5d5a149b67eade44013869164e2a450e999bfd9db317af35e45116ce7e
MD5 ae0f2d106d89c4f086766223b023e1ab
BLAKE2b-256 5a6abca13d6546c06bd4cf6bdb896c08a9e80ce5fb5e28ff3aa97ba02972131a

See more details on using hashes here.

Supported by

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