1. General Help With SSH
  2. SSH With a Graphical Display
  3. SSH From Home is Too SLOW
  4. SSH Without a Password

General Help With SSH

SSH is a helpful tool to be able to work on the labs from home. This document will give you some tips about how to use ssh to effectively work from home.

Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two computers. Encryption provides confidentiality and integrity of data over an insecure network, such as the Internet. SSH uses public-key cryptography to authenticate the remote computer and allow the remote computer to authenticate the user, if necessary.

To ssh into a machine on a linux console you can type

ssh username@remotemachine

If your username is the same as your username on the remote machine the username can be omitted.

On a windows machine I suggest downloading PuTTY. It is a light weight stand alone executable that allows you to ssh into linux machines and is free.

The SPICE machines are not accessible from home however. One way to get around that is to ssh into a machine that is accessible from off-campus and then ssh into one of the SPICE machines. There are two machines available in order to do this; ssh.et.byu.edu and linuxdesktop.et.byu.edu.

SSH With a Graphical Display

SSH allows you to do every thing that you could do on the remote machine from a command line. For most things that is fine but not all of us are commandline pros. If you do

ssh -X username@remotehost

this tells SSH to forward all X Window System (X11) output. X11 is what Linux uses as a display protocol. So if your local machine is Linux you have no problems doing this. If you have a windows machine however it requires that you have an X server. Popular X servers for windows are Xming, WeirdX, and Cygwin/X. I suggest using Xming with PuTTY as this is a little more light weight solution. If you are already using Cygwin though that might be the way to go.

Forwarding the graphical display can be slow however. One reason for this is everything sent through SSH has to be encrypted and then decrypted afterwards. On campus you shouldn't see any performance problems or if you have a fast Internet connection.

SSH From Home is Too Slow

If you are just working from the terminal this is usually not the case but if you are forwarding the X display this can be slow. One solution is to learn tools that allow you to use just the commandline, such as vi or Emacs. The basic functionality for Emacs is not hard to learn but there is a significant learning curve for vi.

Another solution is to use an editor on your local machine that will allow you to edit remote files. vi and emacs will you allow you to open remote files through ftp or ssh. In vi to open a file through ssh do


In emacs you do this by opening a file with


Another solution is you can access your files through ftp at ftp.et.byu.edu. So you can use your favorite text editor and then use a separate ftp client to copy your files over to the SPICE machines. Many of your editors have ftp abilities built into them such as Notepad++, Pspad, and sciTE. I haven't used these features in these editors so I don't know how easy it is to use but imagine that it isn't too hard.

SSH Without a Password

This section and the next are not necessary but can make life using SSH a lot more enjoyable. This first tip is for Linux and Mac machines only. I'm not sure of a way to do it in windows although I'm sure it is possible. It can get old having to type your password every time you use SSH. This especially true if you use scp to copy files to and from the remote machine, scp is like the Linux cp command except it uses SSH. In order to keep from having to type your password over and over you need to copy your SSH public key to the remote machine. So if first you need to generate the key with


Except the defaults. You will then have a id_rsa.pub file at ~/.ssh. This file is your RSA public key that identifies you and your machine. Copy this file to the remote machine by typing

scp ~/.ssh/id_rsa.pub username@remotemachine:~/

Then ssh into the remote machine. Then we need to append that key to the list of authorized keys. There is a file for doing this called .ssh/authorized_keys. It may not exist if you don't have any keys added yet. To create it type

touch ~/.ssh/authorized_keys

Make sure that the permissions are right for the authorized_keys file. It should be -rw-r--r--. For more on file permissions the CS department has a help page.

Then append your key to the end of the list like this

cat ~/id_rsa.pub >> .ssh/authorized_keys

Now log out and log back in and you shouldn't need to type your password.