Skip to content

Remote Access & scp

In research or simulation work, you’ll often need to access remote servers or transfer files between your local system and a cluster or cloud machine. Linux, WSL, and macOS make this easy using SSH for remote access and SCP for secure file transfer.

Connecting to a Remote Server

Use SSH (Secure Shell) to log in to a remote system:

ssh username@remote_address

Example:

ssh mehul@192.168.1.10

Once connected, you can navigate files and run commands just like on your local terminal.

Use exit to safely log out of the remote session.

Transferring Files with SCP

SCP (Secure Copy Protocol) lets you copy files between systems securely over SSH.

TaskCommandExample
Copy a file to remotescp file.txt user@remote:/path/scp mesh.med mehul@192.168.1.10:/home/mehul/
Copy from remote to localscp user@remote:/path/file.txt .scp mehul@192.168.1.10:/home/mehul/results.tar.gz .
Copy entire folderscp -r folder/ user@remote:/path/scp -r project/ mehul@192.168.1.10:/home/mehul/

Notes on Connectivity and Permissions

  • Network access: SSH and SCP require both machines to be on the same network (for local transfers) or accessible over the internet (for remote servers with public IP or VPN access). If you’re on a private or institutional network, ensure the server allows incoming SSH connections (port 22 by default).

  • Permissions: You must have a valid username and password or SSH key access for the remote machine. Without appropriate permissions, login or file transfers will be denied.

  • Firewalls: If you can’t connect, verify that SSH (port 22) is not blocked by a firewall or network policy.

Summary

  • Use ssh to connect and work on a remote machine.
  • Use scp to securely copy files between local and remote systems.
  • Ensure network connectivity, open port 22, and proper permissions (SSH credentials or keys).

These tools are essential for transferring simulation data or running jobs on remote high-performance servers.