npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mtethuc/mremote

v1.0.3

Published

Remote command execution via TCP socket - Control cmd/powershell remotely

Downloads

44

Readme

MRemote

Remote command execution via TCP socket - Control cmd/powershell remotely through network.

🚀 Features

  • Remote Shell Access: Execute commands on remote machines via TCP socket
  • Cross-Platform: Works on Windows (PowerShell/CMD) and Unix systems (bash/sh)
  • Easy to Use: Simple CLI interface with intuitive commands
  • Real-time Output: Stream command output in real-time
  • Multiple Clients: Support multiple simultaneous connections
  • Secure Connection: TCP socket connection on configurable port

📦 Installation

Global Installation (Recommended)

npm install -g mremote

During installation, you'll be prompted to setup auto-start on Windows. The server will automatically start when you log in to Windows.

Local Installation

npm install mremote

🚀 Auto-Start Setup (Windows)

After installing globally, MRemote can automatically start the server when Windows boots.

Automatic Setup (During Installation)

When you run npm install -g mremote, you'll be asked:

Do you want MRemote Server to start automatically when Windows starts? (y/N):

Type y to enable auto-start.

Manual Setup

If you skipped the auto-start setup during installation, you can enable it later:

# Find your npm global path first
npm root -g

# Then run the setup script
node <npm-global-path>/mremote/scripts/setup-autostart.js

Remove Auto-Start

# Using scheduled tasks command
schtasks /delete /tn "MRemote Server AutoStart" /f

# Or run the removal script
node <npm-global-path>/mremote/scripts/remove-autostart.js

Manual Management

  • View Task: Open Task Scheduler (taskschd.msc) and look for "MRemote Server AutoStart"
  • Disable: Right-click the task → Disable
  • Edit: Right-click the task → Properties

🔧 Usage

Start Server

On the machine you want to control remotely:

# Start server on default port 9000
mrm server

# Start server on custom port
mrm server -p 8080

# Start server on specific host
mrm server -h 192.168.1.100 -p 9000

Or using npm:

npm start

Connect to Remote Server

From another machine:

# Connect to remote server
mrm connect <IP_ADDRESS>

# Connect to custom port
mrm connect <IP_ADDRESS> -p 8080

# Examples
mrm connect 192.168.1.100
mrm connect 10.0.0.50 -p 8080
mrm connect localhost

Available Commands (When Connected)

  • exit - Disconnect from server
  • help - Show help message
  • Any shell command - Execute directly on remote machine

📋 Examples

Example 1: Control Windows Machine

On Windows machine (192.168.1.100):

mrm server

From another machine:

mrm connect 192.168.1.100

Now you can run Windows commands:

dir
ipconfig
Get-Process

Example 2: Control Linux Server

On Linux server (10.0.0.50):

mrm server

From another machine:

mrm connect 10.0.0.50

Run Linux commands:

ls -la
ps aux
df -h

Example 3: Custom Port

Server:

mrm server -p 7777

Client:

mrm connect 192.168.1.100 -p 7777

🔐 Security Considerations

⚠️ Important Security Notes:

  • This tool provides full shell access to the server machine
  • Use only in trusted networks (private LAN, VPN)
  • NOT recommended for public internet exposure
  • Consider using firewall rules to restrict access
  • For production use, implement authentication mechanisms

Recommended Security Practices

  1. Firewall Configuration: Only allow connections from trusted IPs
  2. VPN: Use within a VPN tunnel for remote access
  3. Private Network: Use only on private networks
  4. Port Configuration: Use non-standard ports
  5. Monitoring: Monitor connection logs

🛠️ Programmatic Usage

You can also use MRemote in your Node.js applications:

Server

const { RemoteServer } = require('mremote');

const server = new RemoteServer(9000, '0.0.0.0');
server.start();

Client

const { RemoteClient } = require('mremote');

async function main() {
  const client = new RemoteClient('192.168.1.100', 9000);
  
  try {
    await client.connect();
    console.log('Connected!');
    
    client.onData((data) => {
      console.log(data.toString());
    });
    
    client.send('dir');
    
    setTimeout(() => {
      client.disconnect();
    }, 5000);
  } catch (err) {
    console.error('Error:', err.message);
  }
}

main();

🔍 Troubleshooting

Connection Refused

✗ Connection error: connect ECONNREFUSED

Solutions:

  • Make sure the server is running on the target machine
  • Check if the port is correct
  • Verify firewall settings allow the connection

Connection Timeout

✗ Connection error: connect ETIMEDOUT

Solutions:

  • Check network connectivity between machines
  • Verify the IP address is correct
  • Check firewall and router settings

Port Already in Use

Server error: listen EADDRINUSE

Solutions:

  • Another process is using the port
  • Use a different port: mrm server -p 8080
  • Stop the other process using the port

Permission Denied

On Linux/Mac:

sudo mrm server -p 9000

Or use a port above 1024 (doesn't require root):

mrm server -p 9000

📝 System Requirements

  • Node.js >= 14.0.0
  • Network connectivity between machines
  • Firewall rules allowing TCP connections

🔄 Network Configuration

Windows Firewall

Allow inbound connection on port 9000:

# PowerShell (Run as Administrator)
New-NetFirewallRule -DisplayName "MRemote Server" -Direction Inbound -Protocol TCP -LocalPort 9000 -Action Allow

Linux Firewall (UFW)

sudo ufw allow 9000/tcp

Linux Firewall (iptables)

sudo iptables -A INPUT -p tcp --dport 9000 -j ACCEPT

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

MIT

⚠️ Disclaimer

This tool is for educational and legitimate administrative purposes only. Users are responsible for ensuring they have proper authorization before accessing remote systems. Unauthorized access to computer systems is illegal.

📞 Support

For issues and questions, please open an issue on the GitHub repository.


Made with ❤️ for remote system administration