Created
March 6, 2024 17:34
-
-
Save cconstab/142c942ce0c8caa3348d0976a60fbfd1 to your computer and use it in GitHub Desktop.
sshnpd config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# disable "var is referenced but not assigned" warning for template | |
# shellcheck disable=SC2154 | |
# Configuration of sshnpd service | |
# This script is a template for the sshnpd background service. | |
# You can configure the service by editing the variables below. | |
# This service file covers the common configuration options for sshnpd. | |
# To see all available options, run `sshnpd` with no arguments. | |
############# Configure here with your atSigns ################################ | |
manager_atsign="MANAGER_ATSIGN" # MANDATORY: Manager/client address (atSign) | |
device_atsign="DEVICE_ATSIGN" # MANDATORY: Device address (atSign) | |
############################################################################### | |
# Leave as is | |
device_name="DEVICE_NAME" # Device name | |
user="$(whoami)" # MANDATORY: Username | |
v="-v" # Comment to disable verbose logging | |
# Uncomment if you wish the daemon to update authorized_keys to include public | |
# keys sent by authorized manager atSigns | |
s="-s" | |
# Uncomment if you wish to have the daemon make various information visible to | |
# the manager atsign - e.g. username, version, etc - without the manager atSign | |
# needing to know this daemon's device name | |
# u="-u" | |
#sleep 10 # allow machine to bring up network | |
export USER="$user" | |
while true; do | |
# The line below runs the sshnpd service, with the options set above. | |
# You can edit this line to further customize the service to your needs. | |
"$HOME"/.local/bin/sshnpd -a "$device_atsign" -m "$manager_atsign" -d "$device_name" "$s" "$u" "$v" | |
sleep 10 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment