Linux for Bioinformatics

Lesson 14 of 14 · 11 min

Working on a Server with SSH and SCP (and Where to Go Next)

A server is a powerful computer you use over the internet instead of sitting in front of it. In bioinformatics the sequencing files are often too large for a laptop, so labs run their analyses on shared servers or on an HPC cluster (High-Performance Computing: many computers linked together to work as one). This lesson shows you how to log in to such a machine and move files back and forth.

Logging In With SSH

SSH stands for Secure Shell, a program that opens a command-line session on a remote computer over an encrypted (scrambled so others cannot read it) connection. You run it with ssh followed by your username, an @ sign, and the server's address, written together as user@host. The server then asks for your password, and the characters stay invisible as you type, which is normal; once you are in, your prompt changes to show the server's name instead of your own computer's.

bash
# Log in to the server as the user named alice
ssh [email protected]
[email protected]'s password:
==========================================
 Welcome to University Research HPC
==========================================
Last login: Mon Jul 13 09:14:02 2026 from 10.0.4.22
[alice@login01 ~]$

Copying Files With SCP

SCP stands for Secure Copy, and it uses the same secure connection as SSH to move files between your computer and the server. You usually run scp from your own machine rather than from inside an SSH session, and the order of the two paths matters: the first path is what you are copying from and the second is where it should go. A remote location is written as user@host:/path, and a single dot (.) means the folder you are currently in.

bash
# Upload a file from your computer up to the server (local -> remote)
scp reads.fastq.gz [email protected]:/home/alice/data/

# Download a file from the server into your current folder (remote -> local)
scp [email protected]:/home/alice/results/summary.txt .

# Copy an entire folder and everything inside it with -r (recursive)
scp -r alignments/ [email protected]:/home/alice/data/

Try it yourself: On your own computer, make a small file with echo hello > test.txt. Upload it to your home directory on a server you have access to using scp test.txt user@host:/ (the ~ is shorthand for your home directory; replace user@host with your real login details). Then log in with ssh user@host and run ls to confirm test.txt is there. Type exit to close the session and return to your own machine, then download the file back with scp user@host:/test.txt . where the trailing dot is the destination (your current folder).

Where To Go Next

You now have the full loop: use cd and ls to navigate, create and edit files, run commands and chain them together with pipes (the | symbol that feeds one command's output straight into the next), save your steps in a script, then log in with ssh and move data with scp. The natural next step is to practice writing shell scripts (reusable files of commands) and to try real bioinformatics tools such as bwa, which aligns sequencing reads to a reference genome, and samtools, which reads and filters the alignment files that bwa produces. After that, learn a job scheduler like Slurm, the system most HPC clusters use to queue and share heavy jobs fairly across many users.

Keep going with these free resources. MIT's The Missing Semester of Your CS Education covers the shell, scripting, and remote machines in depth. Software Carpentry's The Unix Shell lesson is a gentle, hands-on introduction. The site explainshell.com breaks any command down flag by flag, and the official Slurm Quick Start guide plus the bwa and samtools manual pages (opened with man bwa and man samtools) are the references you will return to most.