You can access the CSE system remotely by logging into the server
Adriatic (adriatic.cse.msu.edu) via SSH ("secure shell"). SSH itself is
just a protocol -- an SSH client uses this protocol to access a computer
running an SSH server.
See the CSE
System Hints for some basic info on using SSH. The remainder of this
page provides more detailed info.
SSH Terminal Clients for Linux and Mac
Most Linux computers (including the CSE worksations), as well as
MacOS X, have a command-line SSH client installed. Use the following
command to log in to the remote computer:
$ ssh (username@)address
- If the username field is missing, the SSH client will attempt to use
the same username that you are logged on with on your local computer.
- The address can be an IP address or a hostname
- If you are on the CSE network (for example, if you are using a lab
computer), you can skip the ".cse.msu.edu" part and just type "adriatic"
for the hostname.
- All student-accessible CSE servers use the default SSH port (22). To
access other servers, you may need to change it by adding a command line
option: ssh address -p port.
- Exit to the local terminal from any SSH login by entering "exit".
SSH Clients for Windows
Some SSH clients for Windows include:
SSHWin is the simple solution, though I don't like it much. It's main
advantage is the ability to open multiple sessions without typing in your
password more than once. Unfortunately, the default background is white
(which can be painful to look at for long periods of time), and I have not
been able to configure colored text to be readable on a black background
using this program.
PuTTY and Xshell both have a dark background by default, which makes them
much more visually appealing. They are both solid and highly configurable,
though there are some disadvantages to each.
- PuTTY absolutely will not save your password. In theory, this is a
security measure, but in practice, it's annoying. In order to open
multiple windows, you must open the program and log in multiple times.
- There's no easy way to change default settings for all sessions (each
new remote computer you add will inherit the default settings at
that time, which you can then modify). Fortunately, this is not
much of a problem for this class, since you only need to be able to log
in to Adriatic.
- Use "USERNAME@adriatic.cse.msu.edu" as the computer name and save a
profile to avoid having to type in your username every time.
- The default blue colors are too dark. You make them lighter by
increasing the RGB green values under Settings -> Windows ->
- See this page for more configuration recommendations: http://dag.wieers.com/blog/improving-putty-settings-on-windows.
- By default, you simply select text to copy, and right click to paste.
To get the menu, right click on the top of the window.
I have not used Xshell as long as PuTTY, but it lacks PuTTY's main
disadvantages. It can also open sessions in multiple tabs, which can be
The main weirdness about Xshell is its awful default shortcuts for copy
and past, which fortunately can be fixed.
Alternatively, consider enabling copy on selection and past on right click,
which is how PuTTY works by default.
- Go to Tools -> Options -> Keyboard and Mouse -> Key Mapping
- Use the "New" button to create shortcuts.
- Use ctrl-shift-c and ctrl-shift-v to avoid messing up the normal
Linux meanings of ctrl-c and ctrl-v.
- Choose "Menu" for the functions, then copy/paste.
Running Graphical Linux Programs Remotely
In order to run graphical linux programs on a remote computer, you will
need to install an X11 server on your local machine (X11 is the most basic
component of any graphical Linux system).
- On a graphical Linux system, you should be able to open graphical
applications with no further issues.
- On Mac, you may need to install X11 depending on which version you
have. Get it at http://xquartz.macosforge.org/trac/wiki.
- For Windows, you can use the program Xming.
Using Xming on Windows
- Install Xming <http://sourceforge.net/projects/xming>.
- Enable X11 tunneling.
- In SSH: Edit -> Settings -> Profile Settings ->
Connections -> Tunneling -> Tunnel X11 connections
- In PuTTY: Connection -> SSH -> X11 -> Enable X11
- Save your settings so that you don't have to do this every time.
Every time you log in
- Start Xming (Not XLaunch). It's a background program with a tray icon.
- Log in to Adriatic.
- Type the command line name of the program you want to use (usually
all lowercase), followed by any options and arguments, ending with
an ampersand (&). This creates a new process for the program,
and allows you to continue to use the terminal even while the program is
Coding on Windows/Mac
We do not recommend you write and store your code on your own computer,
but there are reasons for which you might want to use an editor running on
Windows or Mac instead of on Adriatic remotely while storing and running
your code on the CSE system. For example, when the connection is poor,
there can be significant lag running even a text-based editor remotely.
I have two solutions for you. The first is cross-platform, and the second
Note that you should not compile and test your code on your own
computer, because you will be graded based on how it executes on
Adriatic, and only the CSE lab workstations are similar enough that you
can safely assume that there will be no differences.
You can use the FTP/SFTP client FileZilla,
which is available for Windows, Mac, and Linux, to create, open, and edit
your files, and use your SSH client only for compiling and running code.
- Create a profile for logging into Adriatic as in an SSH client.
- Choose SFTP as the protocol and "Normal" as the authentication method.
- Navigate to your project folder. Right click on the file, and choose
"View/Edit". It should open in your default program for that file type.
- Edit and save your file, then click inside the FileZilla window and
upload the file. Now you can compile and execute your code in your SSH
On Windows, the default program will almost certainly be the useless
Notepad, which is not compatible with Linux files, so you will
need to install a real editor, such as Notepad++.
Open it, go to Edit -> EOL Conversion, and choose "Unix Format".
Mac is a Unix system, so you don't have to worry about the EOL type. You
may still want to use a different editor from the default though.
With either OS, you have several choices for setting your new editor:
- Make your new editor the system default editor for .cpp and .h files.
- Set FileZilla's filetype associations under Edit -> Settings ->
FileEditing -> Filetype Associations.
- Tell FileZilla to use a custom editor for all files under Edit ->
Settings -> FileEditing.
Notepad++ and NppFTP (Windows Only)
Notepad++ also has a built-in FTP client, allowing you to open files from
your CSE account directly (without the extra steps of downloading and
uploading in FileZilla).
- Go to Plugins -> NppFTP -> Show NppFTP Window.
- Create a profile as in FileZilla.
- Open from the sidebar.
- Edit and save as with any other file.
- Use your SSH client to compile and run.
Note that you will still need to set the EOL type correctly: go to Edit
-> EOL Conversion, and choose "Unix Format".
Last updated 1/29/13