Urgent.News

What's breaking now, across thousands of outlets.

Tech

SSH Gives Too Much, Slurm Asks Too Much — and Both Leave Your Files to You

You have a machine with a good GPU. It sits under a desk, or in a rack, or in a cloud account. Your laptop has the code. All you want is to send the work there, let it run, and get the results back. So you do what everyone does. scp -r ./src gpu-box:~/work ssh gpu-box "cd ~/work && make -j8 linux" scp -r gpu-box:~/work/out ./result It works. But look at what you just did. You moved the files in…

When you have a powerful GPU machine, whether it's under a desk, in a rack, or in a cloud account, you often want to send work to it, let it run, and retrieve the results. Traditionally, you've had to manually move files in and out, often using tools like scp and SSH. While these tools work, they require you to remember which folder to bring back, and they leave your files with the GPU box, which can be a security risk.

When a teammate needs to run a similar job, they may be granted shell access, which can lead to security concerns.

A better alternative is GRID (G eneric R untime I ntent- D riven), a middle-ground solution that simplifies the process. GRID acts as a hub that takes your jobs, determines where they should run, and keeps the results. GRID can be installed on your laptop, a small server, or even a single node. It offers a more secure and streamlined approach to running jobs on remote machines.

With GRID, you define a node by providing its available commands in a configuration file. For example, you might specify that a node can run "make" with the "-j8" option for parallel processing. Each job then specifies which command it needs to run, along with any arguments or environment variables. GRID ensures that the node executes the specified command and provides the results back to you.

One of the key benefits of GRID is that it keeps files within the job itself. When you send a job to a GRID-enabled node, the files are copied into a designated space on the node before the job starts. After the job completes, the results are pulled back to your machine, and the files are automatically deleted. This approach eliminates the need to manually manage file transfers and reduces the risk of exposing sensitive data.

GRID is lightweight and doesn't require a full cluster or shared storage infrastructure. It runs on a single binary, works on macOS, Linux, and Windows, and uses a single TCP port (9420) for communication. The hub and node communicate securely over this port, using each other's public keys for authentication.

To use GRID, you create a job file that specifies the tag of the node it needs to run on, followed by instructions for copying files in and out. The job file serves as a clear and concise definition of what the job should do. When you submit a job to GRID, it matches the job with an available node that has the required tag and executes the steps on the node.

If a push or pull operation fails, GRID automatically resumes from where it left off, ensuring that your job completes successfully. The job file also allows you to specify retries and handles failures gracefully, skipping failed steps and notifying you of any errors. This level of control and reliability is often missing with traditional tools like SSH and Ansible.

In summary, GRID provides a lightweight, secure, and efficient way to run jobs on remote machines without the overhead of a full cluster. By keeping files within the job and leveraging a simple job file, GRID simplifies the process of sending work to remote machines and retrieving results. This approach reduces the risk of security breaches and eliminates the need for manual file management, making it an attractive alternative to traditional tools like SSH and Ansible.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Wednesday 11 November →