Linux VM Access Guide

SSH like a pro!

Monday, September 1, 2025

WREN or EECSNet?

  • Make sure you are on the correct network. Ask your instructor.
    • WREN: connect to the WREN WiFi or VPN to vpn.westpoint.edu
    • EECSNet: connect to the EECSNet WiFi or VPN to vpn.eecs.ninja

What is EECSNet?

  • External network provided by EECS Department
  • Supports networking labs and virtual machines for classes and research
  • Outside of normal USMA network security protections and restrictions
    • Must be accessed via VPN or direct connection (WiFi or Ethernet)
    • Carries a little more risk to participating machines
  • Is your VM located on EECSNet? Ask your instructor.
    • If not, skip the EECSNet-related steps.

Connect to EECSNet

WiFi

  • Connect to EECSNet WiFi. Use your WREN credentials.
    • Username: firstname.lastname
    • WREN Password

VPN

  • Start Cisco AnyConnect
  • Connect to vpn.eecs.ninja using your EECSNet credentials.
    • Username: firstname.lastname
    • Initial Password: qwer1234QWER!@#$
    • Update password when prompted ✅

Connect to your Linux VM

VSphere Graphical Interface

Note

This only applies to EECSNet VMs. For graphical access to VMs in the WREN Linux cluster, please talk to your instructor.

  • Navigate to vSphere VM portal at vcsa1.eecs.net
    • Login using your EECSNet credentials
  • Find your VM by navigating the tree on the left and expanding all folders.
  • Note the IP address of your VM.
  • Click on Launch Web Console button and log in using your VM credentials.

SSH from Terminal

  • On your Windows laptop, press the Windows key or click Start or Search at the bottom.
  • Launch Terminal or PowerShell.
  • Type ssh USER@DESTINATION
    • USER is your username on the VM
    • DESTINATION is the hostname or IP address of the VM.
    • Example: ssh firstname.lastname@eecslinuxth123 or ssh cadet@10.20.30.40
    • On WREN, you would typically use your WREN credentials.
  • Enter your password when prompted.
    • You will not see any feedback as you type your password. This is normal.
  • Hit Enter. You should now be logged into the VM via SSH.

Passwordless SSH

  • Go to the terminal. Check if you have existing SSH keys:

    cd ~ # go to your home directory
    cd .ssh # go to the .ssh directory within your home directory
    ls # list files in the .ssh directory
  • If you see files named id_rsa.pub and id_ecdsa.pub, you already have an SSH keypair.

  • If you do not see those files, generate a new SSH keypair: ssh-keygen

    • Press Enter to accept the default file location
    • Press Enter twice to skip passphrase, unless you want the extra security
  • Copy your public key to the VM: ssh-copy-id USER@DESTINATION

    • You will be prompted for your password on the VM one last time!

SSH Config File

Important

You should definitely create it to simplify your SSH commands.

  • Go to your terminal and open your SSH config file:

    nano ~/.ssh/config
  • Add an entry for your VM:

    Host mylinuxvm
        HostName <YOUR_VM_IP>
        User cadet
  • Save and exit: Ctrl+O, Enter, Ctrl+X

VS Code

  • Graphical interface to browse files
  • Run code directly on the VM!
  • Built-in terminal
  • Syntax highlighting
  • Extensions for many programming languages

VS Code Remote SSH Setup

  • Install and run Visual Studio Code and then add Remote - SSH extension

  • Add host: Command Palette → Remote-SSH: Add New SSH Host...

    • Host string: ssh cadet@<YOUR_VM_IP> → save to config
  • When saving to config, choose the first file that is located within your user directory

    • Change the host to your desired name, e.g. cy350vm

    • Type man ssh_config on Linux for a more detailed reference

      Host cy350vm
          HostName <YOUR_VM_IP>
          User cadet

VS Code Remote SSH Connect

  • Connect
    • Command Palette → Remote-SSH: Connect to Host... → choose Linux
    • If prompted, select the Linux platform
    • When prompted, enter your password
    • You should now be connected to your VM via VS Code Remote SSH. Ensure that the bottom-left corner shows the remote connection.

I am on Linux. Now what?

Try out these commands!

ls # list files in the current directory
cd <directory> # change to a different directory
pwd # print the current working directory
nano <file> # open a file in the nano text editor
ps # or `top` or `htop` - view running processes and system resource usage
sudo <command> # run a command with superuser (root) privileges
man <command> # view the manual page for a command
fish # switch to the friendly interactive shell
exit # or `Ctrl+D` - close the shell session

Pick a Text Editor

Transfer Files between your laptop and Linux VM

  • Built-in scp command:

    scp path/to/local/file mylinuxvm:
  • Visual Studio Code with the Remote - SSH extension

  • Use an SFTP client like WinSCP or Bitvise.

  • Pro-tip: Use rsync for large file transfers and directory synchronization.

Learn More!