Enable Allow2Automate the ability to use SSH to configure and control remote devices for comprehensive parental control management.
This plugin extends Allow2Automate with SSH remote control capabilities, allowing parents to manage network devices, routers, and other SSH-enabled systems to enforce parental controls across the entire home network.
- Secure SSH connection management
- Remote command execution
- Enable/disable access controls on remote devices
- Connection status monitoring
- Support for multiple remote devices
- Automated device configuration
- Event-driven triggers for connection events
- Integration with router parental controls
npm install @allow2/allow2automate-sshgit clone https://github.com/Allow2/allow2automate-ssh.git
cd allow2automate-ssh
npm install
npm run build- Install the plugin in your Allow2Automate application
- Configure SSH credentials for target devices
- Set up device profiles and connection details
- Configure security settings and allowed commands
This plugin requires the following permissions:
- network: To establish SSH connections to remote devices and communicate over the network
- configuration: To read and modify plugin settings, including SSH credentials and device configurations
These permissions are necessary for the plugin to:
- Establish secure SSH connections to remote devices
- Execute commands on remote systems for parental control enforcement
- Store and manage SSH credentials securely
- Configure and monitor remote device states
Security Note: This plugin manages SSH credentials. Ensure credentials are stored securely and only trusted administrators have access to plugin configuration.
import SSHPlugin from '@allow2/allow2automate-ssh';
const plugin = new SSHPlugin();
await plugin.actions.connect({
host: '192.168.1.1',
port: 22,
username: 'admin',
password: 'secure-password', // or use SSH key
deviceId: 'router-main'
});const result = await plugin.actions.executeRemote({
deviceId: 'router-main',
command: 'iptables -A FORWARD -s 192.168.1.100 -j DROP',
timeout: 30000
});
console.log('Command output:', result.stdout);await plugin.actions.enableAccess({
deviceId: 'router-main',
childId: 'child-123',
rules: {
allowedIPs: ['192.168.1.100'],
allowedPorts: [80, 443]
}
});await plugin.actions.disableAccess({
deviceId: 'router-main',
childId: 'child-123'
});- Name: Connect SSH
- Description: Connect to remote device via SSH
- Parameters:
host(string): Remote host IP or hostnameport(number): SSH port (default: 22)username(string): SSH usernamepassword(string, optional): SSH passwordprivateKey(string, optional): SSH private keydeviceId(string): Device identifier
- Returns: Connection status
- Name: Execute Remote Command
- Description: Execute command on remote device
- Parameters:
deviceId(string): Device identifiercommand(string): Command to executetimeout(number, optional): Execution timeout
- Returns: Command execution result
- Name: Enable Access
- Description: Enable access on remote device
- Parameters:
deviceId(string): Device identifierchildId(string): Child identifierrules(object, optional): Access rules
- Name: Disable Access
- Description: Disable access on remote device
- Parameters:
deviceId(string): Device identifierchildId(string): Child identifier
- Name: Connection Established
- Description: Triggered when SSH connection is established
- Payload:
deviceId(string): Device identifierhost(string): Remote hosttimestamp(date): Connection time
- Name: Connection Failed
- Description: Triggered when SSH connection fails
- Payload:
deviceId(string): Device identifierhost(string): Remote hosterror(string): Error messagetimestamp(date): Failure time
- Name: Command Executed
- Description: Triggered when remote command is executed
- Payload:
deviceId(string): Device identifiercommand(string): Executed commandexitCode(number): Command exit codeduration(number): Execution duration in ms
This plugin handles sensitive SSH credentials and remote access:
- Secure credential storage - Use encrypted storage for passwords and keys
- Limited command whitelist - Restrict executable commands
- Connection validation - Verify host fingerprints
- Audit logging - Log all connection attempts and commands
- Timeout enforcement - Prevent hung connections
- Least privilege - Use minimal required permissions on remote devices
# Clone the repository
git clone https://github.com/Allow2/allow2automate-ssh.git
cd allow2automate-ssh
# Install dependencies
npm install
# Start development server
npm start
# Build for production
npm run build
# Run tests
npm test- Configure router parental controls
- Manage firewall rules on network devices
- Control access points and switches
- Automate device blocking/unblocking
- Synchronize settings across multiple devices
- Monitor device connectivity
- Node.js 12.0 or higher
- Allow2Automate 2.0.0 or higher
- SSH-enabled remote devices
- Valid SSH credentials for target devices
MIT - See LICENSE file for details
- Issues: GitHub Issues
- Documentation: Allow2 Documentation
- Community: Allow2 Community Forums
Contributions are welcome! Please read our contributing guidelines and submit pull requests to our repository.
Allow2
allow2automate, allow2, ssh, plugin, connectivity, parental-controls, network