Mav's RC is an application designed to remotely control Linux systems through SSH/SFTP. It integrates multiple features into one seamless program, promoting ease of use without requiring any installations on the remote host.
Purpose and Open Source Spirit: Originally developed for personal use, I decided to open-source Mav's RC to contribute to the community—hoping it might assist others in managing their remote systems more efficiently. Feel free to contribute and please note, the application may contain bugs, and its use is at your own risk.
Compatibility Information: Built using Electron, Mav's RC is inherently multi-platform. However, it has been primarily tested on Windows 11. Testing on other platforms is planned, and your feedback is very welcome.
This section guides you through downloading and setting up Mav's RC. Choose from downloading pre-built releases or building the application from source.
You can download the latest version from our GitHub Releases Page. Please be aware that the executable is not code-signed, which may trigger a security warning on Windows.
If you prefer to build the application yourself or wish to contribute to its development, follow these steps:
Ensure that Node.js is installed on your system.
- Clone the repository or download the source:
git clone https://github.com/dubdia/mavs-rc.git
cd mavs-rc
- Install dependencies:
npm install
- Build the application:
npm run make
The built executable will be available in the /out directory.
To debug Mav's RC during development:
- Follow the steps in Building from Source to set up the project.
- Start the application with:
npm run start
or open the workspace in VS Code and navigate to “Run” -> “Start Debugging” or simply press F5 to start the debugging session.
Mav's RC does log to the terminal and file-system to assist in monitoring and debugging. Here’s how logging is handled and how you can customize it:
- Logs are created both in the terminal and in a dedicated file on the filesystem. On Windows systems, you can find the log file at: %APPDATA%\mavs-rc\rc.log
- SSH Credentials: To ensure security, SSH credentials are never logged.
- SSH Traffic: For detailed information, SSH traffic can optionally be logged when the log level is set to verbose.
You’re able to adjust the verbosity of the logs through the application's configuration:
-
Configuration File: Modify the log level in the configuration file located at: %APPDATA%\mavs-rc\rc.config.json
-
The supported log levels are: error, warn, info, verbose
-
Default Level: The preset log level is info.
The security of Mav's RC is a core priority, especially considering the application’s interaction with sensitive data, such as SSH credentials. While achieving absolute security in an Electron-based application with multiple dependencies can be challenging, significant measures have been implemented to mitigate potential risks:
Electron Security Policies: Extensive use of Electron's security capabilities:
- nodeIntegration set to false
- contextIsolation enabled
- webSecurity enforced
- allowRunningInsecureContent set to false
- Application sandboxing enabled
- Content-Security-Policy (CSP): Implemented strict CSP in index.html to mitigate cross-site scripting (XSS) risks: script-src 'self'; worker-src 'self' blob:;
- Network Requests: Electron configurations are in place to block unnecessary requests and redirects.
- Data Bundling: No external data requests post-launch; all necessary data is pre-bundled.
- SSH Credentials: SSH credentials and traffic details are excluded from application logs to preserve confidentiality.
- Fetch and XMLHttpRequest: Disabled native fetch and XMLHttpRequest functionalities in the renderer to reduce external attack vectors.
- Dependency Audits: Regular audits with npm audit confirm no known vulnerabilities in used packages.
- Encryption: Encrypting stored passwords within the configuration file
Encountering issues can be frustrating; here are some common problems and their potential fixes:
- The application relies on systemctl commands which require sudo privileges. If you are not logged in as root and encounter permission errors: Consider modifying your sudoers file to provide necessary permissions to your user.
- Check Logs: Review the log files for clues: %APPDATA%/mavs-rc/logs/
- Reset Application Data: If issues persist, try deleting the application data directory. You may want to back up important configurations such as rc-remotes.config.json_ beforehand: %APPDATA%/mavs-rc/
- Update Node.js: Ensure your Node.js installation is up to date.
- Verbose Output: Use npm run makeVerbose for more detailed build output.
- Clean Project: If builds still fail:
- Delete node_modules, package-lock.json, .vite, and out directories.
- Reinstall dependencies with npm i.
- Restarting your development environment, such as Visual Studio Code, may resolve file lock issues.
- If these steps do not resolve your problems, please open an issue on GitHub for developer support.
The project was initialy created using electron forge with the typescript vite template.
- src/ contains the source code
- main/ contains the main code of the electron app that has full access
- renderer/ contains the js, css and html that runs in the browser/frontend. Has no permissions. Talks via IPC with the main part
- shared/ contains code that is shared between main and renderer
- out/ contains the executables and setup files after calling 'npm run build'
Mav's RC was built using a variety of cool open-source tools and libraries. Many thanks to the following projects and their contributors:
- Electron: For enabling cross-platform desktop app capabilities.
- Forge: Simplified the build process significantly.
- React: For efficient UI development.
- Vite: Enhanced the development workflow with its super fast build tool.
- SSH2 and ssh2-promise: For SSH communication capabilities.
- NextUI: Provided the elegant UI components.
- XTerm: Enabled the integrated terminal functionality.
- Monaco Editor: For the sophisticated text editing features.
- TailwindCSS: For utility-first CSS management.
- Custom Electron Prompt: For good looking prompts in electron
- ssh2-promise: I downloaded the package and made some minor modifications: mostly strictly typing and changed from CommonJs to ES6. The modified code can be found under /mavs-rc/src/main/ssh2-promise
- Background Images/Gradient: those are from NextUI
Changes are tracked in the Changelog