Introduction to SSH

Written by PChan on 2017-03-16

What is SSH

SSH stands for Secure SHell. It allows you to access files and programs on remote computers securely. While the ssh executable is preinstalled on Unix machines, you would need to install a third-party program on Windows machines. Follow the instructions in the Installing SSH Programs guide to install Git Bash.

Syntax of SSH

The most basic syntax for the ssh command is:

$ ssh username@hostname

StuyCS SSH Credentials

When accessing your StuyCS account remotely, you will need to know your username and password:
  • Username
    • If you are Class of 2019 or later, your username is the first part of your email address (everything before the ‘@’)
    • If you are Class of 2018 or earlier, your username is your firstname.lastname
  • Password
    • This is simply the password to your StuyCS account

StuyCS SSH Hostname

Due to a change in ISP, access from outside is not restricted to Therefore, from outside the school, you would run the following command:

$ ssh <username>

In the case that the DNS server is messed up, the IP address for is

After you have connected to, it is in your best interest to ssh into one of the lab machines. Here are the hostnames for the four main servers along with their IP address (in the case that the DNS server is messed up)  (   (   (  (


Never EVER do your work directly on Make sure to switch to a different machine as soon as you are connected.

In addition to the four aforementioned hostnames, you can also access the first five machines in each room where x is in the range of 1-5 (inclusive)


Do NOT keep the ssh connection alive longer than you need to!!

StuyCS Examples


Comments begin after // and are used to explain the command on that line.

Here are some examples:

$ ssh      // To connect from outside
$ ssh                   // Switch to different lab machine
$ ssh      // To connect from the outside
$ ssh                   // Connect to homer with IP address