Chapter 8: Remote Access Tools
Remote Access Tools for Research Computing
Chapter Goals
After reading this chapter, you should be able to:
- Distinguish the fundamental differences between SSH, Termius, Tailscale, and AnyDesk
- Choose the appropriate remote access method based on the scenario
- Configure a remote connection setup suitable for daily research
- Understand the basic concepts of NAT traversal and VPN networking
Motivation
In research, your computing tasks often do not run on the laptop in front of you — they may be on a lab workstation, a university supercomputing cluster, a cloud server, or even a desktop at home. You need a way to remotely access these machines.
But "remote access" is too broad a term. Command line vs. graphical interface? LAN vs. public network? Protocol vs. client? If you cannot tell these apart, you will waste time choosing tools.
8.1 Remote Access Scenario Overview
Common remote access scenarios in research include:
| Scenario | Requirement | Recommended Tool |
|---|---|---|
| Connect to university HPC cluster | Command-line operations, submit jobs | SSH |
| Connect back to lab workstation from a coffee shop | Command line + file transfer | SSH + Tailscale |
| Remotely help a classmate debug a GUI program | View and operate their desktop | AnyDesk |
| Temporarily log in to a server from phone/iPad | Mobile SSH | Termius |
| Access a lab machine with no public IP from home | NAT traversal / virtual networking | Tailscale |
SSH is a protocol, Termius is an SSH client, Tailscale solves network reachability, and AnyDesk provides graphical desktop sharing. They solve entirely different problems and often need to be used in combination.
8.2 SSH: Command-Line Remote Access
SSH (Secure Shell) is the foundational protocol for remote access. Chapter 6 covered SSH installation and configuration in detail; here is a brief review.
Core Features
- Encrypted command-line remote login
- File transfer (
scp,sftp) - Port forwarding
- Key-based authentication
Common Commands
# Log in to a remote server
ssh user@hostname
# Log in using a key
ssh -i ~/.ssh/my_key user@hostname
# Port forwarding: map remote Jupyter port to local
ssh -L 8888:localhost:8888 user@server
# Transfer files
scp local_file.txt user@server:/remote/path/
SSH Config
Edit ~/.ssh/config to greatly simplify connection commands:
Host lab-server
HostName 192.168.1.100
User zhangsan
Port 22
IdentityFile ~/.ssh/id_ed25519
Host hpc
HostName hpc.university.edu
User s2024001
ForwardAgent yes
After configuration, simply use ssh lab-server to connect.
8.3 Termius: Cross-Platform SSH Client
Termius is a commercial SSH client that supports macOS, Windows, Linux, iOS, and Android.
Why Not Just Use ssh in the Terminal?
For most cases, the ssh command in the terminal is perfectly sufficient. Termius excels in:
- Multi-device sync: Sync server lists and keys across phone, tablet, and computer
- Graphical management: More user-friendly for those unfamiliar with command-line configuration
- SFTP file management: Built-in graphical file transfer
- Snippet management: Save frequently used command snippets
Installation
# macOS
brew install --cask termius
# Windows (winget)
winget install Termius.Termius
# Linux (download .deb from the official site)
# Visit https://termius.com/download/linux for the latest .deb
sudo dpkg -i termius_*.deb
sudo apt install -f # install any missing dependencies
Configuration Steps
- Open Termius and register an account (free version has limited features)
- Click New Host and enter the server address and username
- Add an SSH key or password
- Click connect
The free version of Termius does not support sync or SFTP. If you primarily work on a single computer, the built-in terminal + ssh command is more than enough. Termius's main value lies in mobile devices and multi-device sync. Students can apply for the GitHub Education Pack to get free Premium access.
8.4 Tailscale: Virtual Networking and NAT Traversal
Background
Many lab workstations do not have a public IP, making direct SSH connections from off-campus impossible. Traditional solutions include:
- University VPN (usually slow)
- frp / ngrok and other NAT traversal tools (require a public-facing server)
- ZeroTier / Tailscale (WireGuard-based virtual networking)
What Is Tailscale?
Tailscale is based on the WireGuard protocol and connects your devices into a virtual LAN (VPN mesh). After installing Tailscale, each device gets a 100.x.x.x virtual IP, and devices can communicate directly as if they were on the same local network.
Installation and Configuration
# macOS
brew install --cask tailscale
# Windows (winget)
winget install Tailscale.Tailscale
# Ubuntu/Debian (official script — sets up an apt repo and installs)
curl -fsSL https://tailscale.com/install.sh | sh
sudo tailscale up
Usage Flow
- Install Tailscale on all devices that need to interconnect
- Log in with the same account (supports Google, GitHub, etc.)
- Each device gets a Tailscale IP (e.g.,
100.64.0.1) - Then you can SSH directly using the Tailscale IP:
ssh user@100.64.0.2
Typical Scenario
┌──────────────┐ Tailscale Network ┌──────────────┐
│ Your laptop │ ◄──────────────────────────► │ Lab workstation│
│ (coffee shop)│ 100.64.0.1 │ (no public IP) │
│ │ ↕ │ 100.64.0.2 │
└──────────────┘ ↕ └──────────────┘
┌──────────────┐
│ Your phone │
│ 100.64.0.3 │
└──────────────┘
- The free version of Tailscale supports up to 100 devices, which is more than enough for personal use
- Some network environments (e.g., campus networks that restrict UDP) may affect connection quality
- Tailscale itself does not provide SSH functionality — it only solves network reachability; you still need an SSH service running on the target machine
8.5 AnyDesk: Graphical Remote Desktop Control
When Do You Need Graphical Remote Access?
- Running scientific software with a GUI (e.g., VESTA, Avogadro, ParaView)
- Remote demonstrations or helping classmates debug
- Accessing Windows/macOS machines that only have a desktop environment
AnyDesk vs. Other Solutions
| Tool | Features |
|---|---|
| AnyDesk | Low latency, cross-platform, free for personal use |
| TeamViewer | Similar features but more restrictions for free users |
| RDP (Windows) | Built into Windows, limited to Pro/Enterprise editions |
| VNC | Open source but complex to configure, mediocre performance |
| X11 Forwarding | Forwards individual windows via SSH, high latency |
Installation
# macOS
brew install --cask anydesk
# Windows (winget)
winget install AnyDesk.AnyDesk
# Ubuntu (official apt repository)
wget -qO- https://keys.anydesk.com/repos/DEB-GPG-KEY \
| gpg --dearmor \
| sudo tee /etc/apt/keyrings/anydesk.gpg > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/anydesk.gpg] http://deb.anydesk.com/ all main" \
| sudo tee /etc/apt/sources.list.d/anydesk.list
sudo apt update && sudo apt install anydesk
How to Use
- Install AnyDesk on both machines
- Note the remote machine's AnyDesk address (a string of numbers)
- Enter that address on the local machine and request a connection
- Confirm the connection request on the remote machine
If you need unattended access (e.g., connecting to an unattended lab workstation), you can set a password on the remote machine: AnyDesk → Settings → Security → Unattended Access → Set Password.
8.6 Differences and Applicable Scenarios
This is the most important section. Many beginners confuse these tools because they are all related to "remote access."
Fundamental Differences
| Dimension | SSH | Termius | Tailscale | AnyDesk |
|---|---|---|---|---|
| Nature | Communication protocol | SSH client software | Virtual networking tool | Remote desktop software |
| What it solves | Encrypted remote command line | Convenient SSH usage | Making devices reachable | Graphical remote control |
| Analogy | HTTP protocol | Chrome browser | Router/network cable | Remote desktop screen sharing |
| Required? | Yes (foundational) | No (has alternatives) | Depends on network | Depends on needs |
| CLI/GUI | CLI | GUI + CLI | Background service | GUI |
| What it transfers | Commands, files | Commands, files | Network packets | Screen image + input |
Combined Usage Examples
Scenario: SSH from home to a lab Linux workstation with no public IP
Solution: Tailscale (networking) + SSH (connection)
Tailscale virtual network
Home laptop ◄─────────────────────► Lab Linux
│ │
└── ssh user@100.64.0.2 ────────────►│
Scenario: Submit HPC jobs from an iPad
Solution: Termius (mobile SSH client)
iPad Termius App ──── SSH ────► HPC cluster (has public address)
8.7 Recommended Configuration Plans
Plan 1: Minimal Setup (For Everyone)
Suitable for scenarios with a public IP or campus VPN:
- Configure
~/.ssh/config - Use key-based authentication (disable password login)
- Use the terminal
sshcommand for daily work
Plan 2: NAT Traversal Setup
Suitable when lab machines have no public IP:
- Install Tailscale on all devices and log in with the same account
- Note each device's Tailscale IP
- SSH via Tailscale IPs
- Use Tailscale IPs in
~/.ssh/config:
Host lab-via-tailscale
HostName 100.64.0.2
User zhangsan
IdentityFile ~/.ssh/id_ed25519
Plan 3: Mobile Device Setup
- Install Termius (phone/tablet)
- Import SSH keys
- Combine with Tailscale for connectivity from any network
Plan 4: Graphical Remote Setup
When remote GUI access is needed:
- Install AnyDesk and configure unattended access
- AnyDesk has built-in relay/NAT traversal — no Tailscale required to connect across the internet
- If you already have a Tailscale network, you can also connect AnyDesk via Tailscale IPs to bypass relay servers entirely
8.8 Security and Privacy Considerations
- SSH keys > passwords: Always prefer key-based authentication
- Disable root login: Edit
/etc/ssh/sshd_configand setPermitRootLogin no - Change the default port: Changing the SSH port from 22 to another port reduces scan attacks
- Use a strong AnyDesk password: Unattended access passwords should be at least 12 characters with mixed case and numbers
- Tailscale ACL: In shared Tailscale networks, configure access control lists
- Do not save keys on public computers: Clean up when done
SSH Hardening Example
# Edit the SSH server configuration
sudo nano /etc/ssh/sshd_config
# Recommended settings:
# PermitRootLogin no
# PasswordAuthentication no
# PubkeyAuthentication yes
# Port 2222
# Restart the SSH service
sudo systemctl restart sshd
Firewall Basics
# Ubuntu UFW firewall
sudo ufw allow 2222/tcp # Allow custom SSH port
sudo ufw enable
sudo ufw status
FAQ
Q: Which tool should I learn first? A: Learn SSH first (Chapter 6). SSH is the foundation of all remote operations. Learn other tools as needed.
Q: What is the difference between Tailscale and a VPN? A: Traditional VPNs use a client-server model (all traffic goes through a central server); Tailscale uses a mesh model (devices connect directly to each other). Tailscale is faster and better suited for connecting personal devices.
Q: Will AnyDesk remote access be laggy? A: It depends on network bandwidth. It is very smooth on a LAN; when crossing the public internet, consider lowering the quality settings. For pure command-line operations, SSH is always more efficient than graphical remote access.
Q: Can VS Code Remote SSH replace these tools? A: VS Code Remote SSH is an excellent development solution, but it solves the "remote development" problem. Network reachability (Tailscale) and graphical remote access (AnyDesk) are things it cannot replace.
Summary
| Tool | One-Line Summary |
|---|---|
| SSH | The foundational protocol for remote command line — a must-learn |
| Termius | A graphical SSH client, useful on mobile devices |
| Tailscale | Virtual networking, solves the "can't connect" problem |
| AnyDesk | Remote desktop, used when GUI access is needed |
Core principle: SSH requires network reachability first (via Tailscale or a public IP); AnyDesk has built-in traversal and needs no extra networking. Choose your access method (SSH / AnyDesk) based on need, then pick the client (terminal / Termius).
Exercises
- Basic: Configure
~/.ssh/configto enable one-command SSH access to your server - Intermediate: Install Tailscale on two devices and verify they can
pingeach other - Intermediate: Use SSH port forwarding to map a remote Jupyter Notebook to your local browser
- Exploration: Install AnyDesk and try remotely controlling one computer from another
- Reflection: Draw a diagram showing all the devices involved in your daily research and the connections between them — think about which tools are appropriate for each connection