Skip to content

petrbol/netConfigure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

netConfigure

A web-based SSH/SCP configuration management tool for deploying files and executing commands across multiple remote hosts simultaneously.

netConfigure Screenshot

Required applications

  • sshpass
  • ssh
  • scp

Usage

Install

  • Manually: pre-compiled executable files can be found in bin directory
  • Package: debian .deb package can be found in debian-pkg directory, install using dpkg -i package.deb

Run

  • Manually: Execute binary file manually and open web page at http://localhost:8080
  • Systemd service: systemctl status/start/stop/disable/enable netconfigure.service
  • Systemd configuration file located in /etc/default/netconfigure

Startup options

  • listenAddr string, Server listen address (default all)
  • listenPort int, Server listen port (default 8080)

1. Authentication

  • Enter your SSH username and password in the configuration section

2. Import Destination Hosts

  • Prepare a JSON file containing your host configurations. A port value is optional:
[
  {
    "address": "10.254.101.66",
    "port": 22,
    "display_name":"LocationA - device 01"
  },
  {
    "address": "10.254.101.67",
    "port": 22,
    "display_name":"LocationA - device 02"
  }
]
  • Click "Upload File" to import your destination list

3. Configure Operations

  • SSH Command: Enter the command to execute on remote hosts
  • SCP Target Directory: Specify the destination directory for file uploads if necessary
  • File Upload: Select a file to transfer to all hosts if necessary

Post-install tips

  • Add RSA support for old devices, modify /etc/ssh/ssh_config
HostKeyAlgorithms = +ssh-rsa
PubkeyAcceptedAlgorithms = +ssh-rsa
  • Secure app access using apache/htaccess proxy example (destination address 10.10.20.38:8080), App use web socket
<VirtualHost *:443>
    ServerName XXXXXXXXXXXXXXXXXXx

    <Location />
        AuthType Basic
        AuthName "Restricted Access"
        AuthUserFile /etc/apache2/.htpasswd
        Require valid-user
    </Location>

    # Enable proxy and preserve host
    ProxyPreserveHost On
    ProxyRequests Off
    
    # WebSocket proxy configuration
    ProxyPass /ws/ ws://10.10.20.38:8080/ws/
    ProxyPassReverse /ws/ ws://10.10.20.38:8080/ws/

    # HTTP proxy
    ProxyPass / http://10.10.20.38:8080/
    ProxyPassReverse / http://10.10.20.38:8080/
    
    # Rewrite rules for WebSocket
    RewriteEngine On
    RewriteCond %{HTTP:Upgrade} websocket [NC]
    RewriteCond %{HTTP:Connection} upgrade [NC]
    RewriteRule ^/?(.*) "ws://10.10.20.38:8080/$1" [P,L]
    
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLCertificateFile XXXXXXXXXXXXXXXXXXx
SSLCertificateKeyFile XXXXXXXXXXXXXXXXXXx
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published