Record dynamic public ip and use the record value to make SSH connection or transfer
ip_record
home_connect
home_rsync
- Add
home_rsync
feature - Add
version
option to show version information - Change ip record method to record if only ip has change
- Add
setup
optionshome-connect
: Setup home-connect featureip-record
: Setup ip-record featureall
: Setup all feature
- Fix missing google credential SCOPES definition
- Add
home-connect
feature (autoconnect) - multiple ssh connect sections configuration
- GCP
- Sheet API enabled
- generate OAuth key:
credential.json
- Accept this program to read and edit spreadsheet
- Copy Google spreadsheet from template: template spreadsheet
config.ini
file
Program configuration
sheet-id: Set sheet id to read
credential-file: [Optional]
template-sheet: [Optional]
SSH connection configuration
[CONNECTION_NAME_SSH]
ssh-user: ssh login user
ssh-port: ssh login port
ssh-key-path: secret key for ssh login
RSYNC connection configuration
[CONNECTION_NAME_RSYNC]
rsync-user = rsync user
rsync-dest = rsync destination (/destination/path)
rsync-source = rsync source
rsync-options = rsync options (-a --exclude)
rsync-port = rsync login port
rsync-key-path = rsync login key path
setup.sh
file
Setup environment
./setup.sh home-connect|home-rsync|ip-record|all DESTINATION
home-connect Setup for home-connect function
home-rsync Setup for home-rsync function
ip-record Setup for ip-record function
all Setup for all functions
Run this program to find your current public ip address and documented it to Google spreadsheet
usage: ip_record.py [-h] [-V]
optional arguments:
-h, --help show this help message and exit
-V, --version show program's version number and exit
Run this program to ssh connect to ip_record
lastest ip address
usage: home_connect.py [-h] [-V] connection
positional arguments:
connection Section name set in configuration file - config.ini
optional arguments:
-h, --help show this help message and exit
-V, --version show program's version number and exit
Run this program to perform rsync to destination of ip_record
latest ip address
usage: home_rsync.py [-h] [-V] connection
positional arguments:
connection Section name set in configuration file - config.ini
optional arguments:
-h, --help show this help message and exit
-V, --version show program's version number and exit
1
- program usage error
3
- template sheet not found
5
- target sheet not found
11
- conf_mod ConfigNotFoundError
12
- conf_mod NoSectionError
13
- conf_mod NoOptionError