Nav

How to SSH into the Linux Lab

Edit me

You can use SSH to log in remotely to the department’s Linux workstations with your Computer Science Linux account, from on or off campus, through the Linux machines in Adams Hall. See the Linux Lab page for more about the lab and its software.

SSH clients

  • Windows and macOS include an SSH client that you run from a terminal: Windows Terminal or PowerShell on Windows, Terminal on a Mac. (On Windows, if the ssh command isn’t found, turn on the OpenSSH Client under Optional features in Settings.)
  • Other options on Windows: PuTTY, Cygwin and MobaXterm.
  • VS Code: you can also work on the Linux machines from Visual Studio Code with the Remote - SSH extension (see below).

Procedure

  1. Open a terminal (or your SSH client).
  2. Enter the following command:
    ssh -p 5010 [email protected]
    

    The username is your Hofstra Network ID (the same as your Hofstra Portal username), and xx is a number from 01 to 30. If the machine you try is unreachable, try a different number.

  3. Type yes and press Enter the first time you connect to a machine.
  4. Type in your Linux account password and press Enter. Nothing appears on the screen while you type a password; that is normal.

The first time you log in, use the temporary password you were given for your Linux account. You will be asked to enter it again and then to choose a new password twice. The new password must be at least 8 characters long, include at least three kinds of characters (uppercase letters, lowercase letters, numbers, special characters), and must not contain your name or common dictionary words. Once you have set it, connect again with your new password.

At this point, you should be logged in to a lab computer and have access to your Linux account. If you forget your Linux account password or have trouble logging in, ask for help at SIC 227.

Using VS Code

  1. Install the Remote - SSH extension in VS Code.
  2. Add a host with the command above (ssh -p 5010 [email protected]).
  3. In VS Code’s Settings, search for Remote SSH: Show Login Terminal and turn it on, so that the login prompts appear in a terminal when you connect.

X11 Forwarding

To use graphical (GUI) applications over SSH, add the -Y option to the ssh command. You will also need an X server on your computer: Cygwin/X or MobaXterm on Windows, or XQuartz on a Mac. For more information, see X11 forwarding with Cygwin.

See also