Objective

Connect to the Matrix Linux server via SSH over VPN, navigate a remote shell environment, and understand secure remote access fundamentals.

Tools & Technologies

  • SSH
  • VPN
  • OpenVPN
  • matrix.senecapolytechnic.ca

Key Commands

vpn connect matrix-vpn
ssh -p 7800 user@matrix
scp file user@matrix:~/

Architecture Overview

flowchart TD A[Your Machine] -->|1. Connect VPN| B[VPN Gateway] B -->|2. Tunnel| C[Campus Network] C -->|3. SSH Port 22/7800| D[Matrix Server] D -->|4. Shell Session| E[Your Prompt] style A fill:#1a1a2e,stroke:#00d4ff,color:#e0e0e0 style D fill:#1a1a2e,stroke:#00ff88,color:#e0e0e0 style B fill:#181818,stroke:#1e1e1e,color:#888 style C fill:#181818,stroke:#1e1e1e,color:#888 style E fill:#181818,stroke:#00ff88,color:#e0e0e0

Step-by-Step Process

01
Install & Connect VPN

Download the VPN client and import the Matrix VPN profile. Authenticate with your college credentials.

# Connect VPN first
sudo openvpn --config matrix.ovpn
# or use NetworkManager GUI
sequenceDiagram participant L as Your Laptop participant V as VPN Gateway participant M as Matrix Server L->>V: OpenVPN handshake V-->>L: Encrypted tunnel established L->>M: SSH connection request M-->>L: Host key verification L->>M: Username + password M-->>L: Shell prompt
02
SSH Connection

Open a terminal and connect using the SSH command. Verify the host key fingerprint on first connection.

ssh [email protected]
# Accept host key fingerprint
# Enter password when prompted
# Check you're logged in:
hostname && whoami
03
Explore the Shell

Run basic commands to orient yourself: check who you are, where you are, what's available.

whoami          # your username
hostname        # server name
pwd             # current directory
echo $SHELL     # which shell
uname -a        # kernel info
04
Secure Copy Files

Transfer files between your local machine and Matrix using scp.

# Local → Remote
scp myfile.txt user@matrix:~/
# Remote → Local
scp user@matrix:~/file.txt .
# Copy directory recursively
scp -r mydir/ user@matrix:~/

Challenges & Solutions

  • VPN must be active before SSH — connection refused otherwise
  • Host key changed warning after server update — verify with admin before accepting

Key Takeaways

  • Always connect VPN before SSH to campus servers
  • SSH keys eliminate password prompts for repeated connections