Appearance
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_addressExample:
ssh mehul@192.168.1.10Once connected, you can navigate files and run commands just like on your local terminal.
Use
exitto safely log out of the remote session.
Transferring Files with SCP
SCP (Secure Copy Protocol) lets you copy files between systems securely over SSH.
| Task | Command | Example |
|---|---|---|
| Copy a file to remote | scp file.txt user@remote:/path/ | scp mesh.med mehul@192.168.1.10:/home/mehul/ |
| Copy from remote to local | scp user@remote:/path/file.txt . | scp mehul@192.168.1.10:/home/mehul/results.tar.gz . |
| Copy entire folder | scp -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
sshto connect and work on a remote machine. - Use
scpto 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.