CCRMA Documentation links:   index   contents   overview   rooms   account   staff   about

(contents of this file: links to each section)

Remote Login General Instructions

Most computers can log in remotely to certain other computers via secure shell. It gives you a command line interface where the commands you type take effect on the remote machine (the one you logged into remotely) instead of the local machine (the one you are physically looking at and typing on). Sound is unfortunately not transmitted (except for the bell character), though in many situations you can do graphical user interfaces with X forwarding.

Here’s how:

  1. Figure out which remote machine you’re trying to log into, for example one of the CCRMA Linux Workstations or perhaps a remote-login-only machine such as ccrma-gate (the preferred computer for most remote login tasks) or cm-matlab. Make sure you have an account on that machine and that you know your login name and password.

  2. Open a terminal application such as OSX Terminal, PuTTY on Windows, or a plain terminal on Linux.

  3. Type this ssh command, substituting your own login name for LOGIN_NAME:


    for example if your login is matt you would type


    (also you can substitute a different computer for ccrma-gate if you know what you are doing and have reason to log into a different machine).

  4. Then press enter.

  5. If this is your first time logging into this particular computer from this particular computer, you will have to confirm that this is indeed the computer you want to connect to. You might see a message such as The authenticity of host 'ccrma-gate (' can't be established followed by some scary gibberish you can safely ignore. Just say yes.

  6. Next you must enter your password, then press enter. You will not see the password as you are typing (in case somebody is watching over your shoulder), so make sure to type it correctly. If you type the wrong password then after a few seconds you will see a message such as Permission denied, please try again and then another prompt asking you to re-enter the password. (After three failed attempts to a CCRMA computer, your account will be temporarily locked).

  7. You should now see a command prompt telling you which machine you’re logged into and your user name, for example:

     [ccrma-gate matt] ~>
  8. Yay you are now logged in! Any commands you type take effect on the remote computer (in this example ccrma-gate), not the computer you are actually physically interacting with.

  9. When you’re done you can disconnect from the remote computer by typing exit or logout or Control-D. After that, commands you type go back to taking effect on the local computer. Always be conscious of which computer each of your windows is “talking to”!

X Forwarding

When you log in remotely to a Linux machine, there is a way for most graphical programs to display their interactive windows on your local machine: X forwarding. If you pass the -Y option to ssh it will allow for X forwarding over the secure connection.

The xeyes program is good for testing this because it launches quickly and is funly interactive.

  1. Be running an X server on your local machine (see below).

  2. Log into the remote machine using ssh -Y LOGIN_NAME@machine.on.the.internet

  3. Type xeyes on the remote machine (or whatever program you want to run: qjackctl, matlab, etc.)

  4. See a small window appear on your local machine with a pair of eyes that follow the cursor.

  5. Have fun then quit the program (either by closing the window on your local machine or with control-C in the terminal where you are logged into the remote machine)

  6. Try it again with the graphical program(s) you really want to use.

If your local machine is Linux this should work automatically. Otherwise you have to install an X server application such as XQuartz for OSX or xming for Windows.

SSH Keys

SSH keys use public-key cryptography so that a remote computer “believes you’re you” simply because of a special file that exists on the computer you’re currently using (possibly remotely), avoiding the need to type a password.

You start with a computer that is going to be trusted, that you’re confident nobody else can ever use as you, e.g., your laptop (or your CCRMA account) , assuming you keep it safe. On that computer you run the program ssh-keygen to generate a matched pair of “keys”. The private key never leaves the trusted computer. You copy the public key to any other computers (to which you have access) that will “trust” the trusted computer. When you’re logged in as you on the trusted computer, you can access these other computers (via ssh, scp, rsync, git…) without having to type a password.

There’s a lot to know about it, but in short, once you understand the security implications (that if the trusted machine is hacked then the hacker has access to all the other machines too), the logistics are quite simple: you just run ssh-keygen then copy the public key to the other computer(s), as shown in several online recipes:

This page of CCRMA documentation last committed on Tue Oct 10 17:03:18 2023 -0700 by Matthew James Wright. Stanford has a page for Digital Accessibility.