Remote Access

From CCRMA Wiki

(Difference between revisions)
Jump to: navigation, search
(X11 Display Forwarding)
 
(9 intermediate revisions not shown)
Line 1: Line 1:
==Overview==
==Overview==
-
CCRMA has several ways of accessing resources remotely.
+
CCRMA has several ways of accessing resources remotely.  Please log out when you are not using the connection.
===ccrma-gate===
===ccrma-gate===
-
<code>ccrma-gate.stanford.edu</code> is a great place to start with remote logins.  It is a server who's sole purpose is to provide remote login's with lightweight tasking: <code>ssh</code> for clerical things (surf directories), <code>scp</code> or <code>sftp</code> for copying files, simple edits with terminal text editors (like <code>emacs</code> and <code>vi</code>), email with <code>[[Email#Pine|pine]]</code>; anything that doesn't require substantial computation.  It has no sound card. [[Remote_Access#X11_Display_Forwarding|X11 display forwarding]] is available.
+
<code>ccrma-gate.stanford.edu</code> is a great place to start with remote logins.  It is a server who's sole purpose is to provide remote login's with lightweight tasking: <code>ssh</code> for clerical things (surf directories), <code>scp</code> or <code>sftp</code> for copying files, simple edits with terminal text editors (like <code>emacs</code> and <code>vi</code>, and <code>pico</code>), email with <code>[[Email#Pine|alpine]]</code>; anything that doesn't require substantial computation.  It has no sound card. [[Remote_Access#X11_Display_Forwarding|X11 display forwarding]] is available.
 +
 
 +
<pre>~>ssh <username>@ccrma-gate.stanford.edu</pre>
===cmnXX hosts===
===cmnXX hosts===
 +
 +
Users can log in to any CCRMA host (e.g. cmn23) from anywhere and use computing resources.  Please be sensitive to the fact that someone would be logged in to that machine locally.  You can check by typing the <code>w</code> command in a terminal, which lists who is logged into the machine.  <code>finger</code> will list all logins on all hosts.
 +
 +
<pre>~>ssh <username>@cmn35.stanford.edu</pre>
 +
 +
In the example above, the user is logging in to cmn35, which is the machine located at the CCRMA Stage.
===cm-matlab===
===cm-matlab===
-
 
+
 
 +
We have a 64-bit version of Matlab installed in a Linux server with 64Gb of memory and a Tesla GPU.  Users can log in and run computations.  If your computation needs lots of data reads or writes, please move source files (temporarily) to the <code>cm-matlab:/scratch</code> directory.  Within /scratch create a directory with your CCRMA Username and put all your files inside.
==Things to remember==
==Things to remember==
Line 48: Line 57:
Once you are logged in you can run any GUI based applicatio from the command line for example:
Once you are logged in you can run any GUI based applicatio from the command line for example:
-
<pre>~>evolution</pre>
+
<pre>~>gedit</pre>
-
and it will open locally in an X Window but be running on a CCRMA computer with only the display information being forwarded.  You can interact with the program in the usual way.  You may find some delay in the interaction based on what kind of bandwidth is available for your connection.  You may want to consider command line or text alternatives to using ''display forwarding'' of you have limited bandwidth. For example, you could use <code>pine</code> rather than Evolution to check your email, or use matlab in 'nodisplay' mode:
+
and it will open locally in an X Window but be running on a CCRMA computer with only the display information being forwarded.  You can interact with the program in the usual way.  You may find some delay in the interaction based on what kind of bandwidth is available for your connection.  You may want to consider command line or text alternatives to using ''display forwarding'' if you have limited bandwidth. For example, you could use <code>alpine</code> (a text based email client) rather than Thunderbird (a GUI based email client) to check your email, or use Matlab or Emacs in 'nodisplay' mode:
<pre>~>matlab -nodisplay</pre>
<pre>~>matlab -nodisplay</pre>
 +
<pre>~>emacs -nw</pre>
 +
 +
=== X11 Display forwarding and OpenGL ===
 +
 +
In some cases ''display forwarding'' won't work (possibly for any OpenGL program). If you get an error like:
 +
 +
<pre>Error: couldn't get an RGB, Double-buffered visual</pre>
 +
 +
or
 +
 +
<pre>
 +
freeglut (./myFirstGL):  ERROR:  Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow
 +
X Error of failed request:  BadWindow (invalid Window parameter)
 +
  Major opcode of failed request:  4 (X_DestroyWindow)
 +
  Resource id in failed request:  0x0
 +
  Serial number of failed request:  26
 +
  Current serial number in output stream:  29
 +
</pre>
 +
 +
you might try this after logging into the CCRMA machine (using <code>~>ssh -Y <username>@ccrma-gate.stanford.edu</code>):
 +
 +
<pre>~>export LIBGL_ALWAYS_INDIRECT=y</pre>
 +
 +
==VNC==
 +
VNC instances are discouraged on CCRMA hosts.  Open sessions tend to accumulate, when folks forget they've left a session running somewhere.  System Admin follows up on stale sessions. 
== Logout ==
== Logout ==

Current revision as of 22:47, 9 September 2012

Contents

Overview

CCRMA has several ways of accessing resources remotely. Please log out when you are not using the connection.

ccrma-gate

ccrma-gate.stanford.edu is a great place to start with remote logins. It is a server who's sole purpose is to provide remote login's with lightweight tasking: ssh for clerical things (surf directories), scp or sftp for copying files, simple edits with terminal text editors (like emacs and vi, and pico), email with alpine; anything that doesn't require substantial computation. It has no sound card. X11 display forwarding is available.

~>ssh <username>@ccrma-gate.stanford.edu

cmnXX hosts

Users can log in to any CCRMA host (e.g. cmn23) from anywhere and use computing resources. Please be sensitive to the fact that someone would be logged in to that machine locally. You can check by typing the w command in a terminal, which lists who is logged into the machine. finger will list all logins on all hosts.

~>ssh <username>@cmn35.stanford.edu

In the example above, the user is logging in to cmn35, which is the machine located at the CCRMA Stage.

cm-matlab

We have a 64-bit version of Matlab installed in a Linux server with 64Gb of memory and a Tesla GPU. Users can log in and run computations. If your computation needs lots of data reads or writes, please move source files (temporarily) to the cm-matlab:/scratch directory. Within /scratch create a directory with your CCRMA Username and put all your files inside.

Things to remember

There are a few things to remember however you log in from a remote host:

- be cognizant of the potential for keyboard password sniffers when typing your username and password. read: internet cafe's, etc. just know they exist.

- if logging into a workstation host (e.g. cmnXX), anyone logged in to that machine locally has priority over the host's resources. Best to look for another host to login. Check if someone else is logged in by typing the 'w' command:

~> w
 20:47:19 up 11 days,  2:16,  1 user,  load average: 0.14, 0.07, 0.05
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
me       pts/1    111.222.33.44     20:16    0.00s  0.29s  0.01s w
jimmyjoe pts/2    :0                18:13    0.14m  0.22s  0.01s /bin/bash

notice that user 'me' (the one logging in) and 'jimmyjoe' are both logged in. 'jimmyjoe' has a ':0' in the line, which means he is logged in locally, but 'me' has an IP address '111.222.33.44' in the same column, indicating a remote login from that IP. If no one else is logged in locally, then you are good. Try and give preference to someone logging in after you. They may not know you are logged in remotely. Depending on what you are trying to do with your login you both may be able to work. The best way to see resource usage is with the 'top' command which shows a real-time listing of processes and resources currently in use. A detailed look at 'top' is a bit out of the scope here, but give it a try and see what it does. Tip: After running 'top' try pressing the '1' key to look at each CPU's statistics independently.


You can login remotely to through a server called ccrma-gate.stanford.edu by typing the following in a terminal window:

~>ssh <username>@ccrma-gate.stanford.edu

You will see this response in your terminal:

Welcome to CCRMA, Stanford University
[This system is for authorized use only]

<username>@ccrma-gate.stanford.edu's password: 

Enter your password, and you will be presented with a prompt located at your home directory.

X11 Display Forwarding

A useful tool for using GUI based applications at home that are running on a CCRMA machine is display forwarding. This tool forwards X11 display information to your remotely logged in host, provided you have X11 installed.

~>ssh -Y <username>@ccrma-gate.stanford.edu

Once you are logged in you can run any GUI based applicatio from the command line for example:

~>gedit

and it will open locally in an X Window but be running on a CCRMA computer with only the display information being forwarded. You can interact with the program in the usual way. You may find some delay in the interaction based on what kind of bandwidth is available for your connection. You may want to consider command line or text alternatives to using display forwarding if you have limited bandwidth. For example, you could use alpine (a text based email client) rather than Thunderbird (a GUI based email client) to check your email, or use Matlab or Emacs in 'nodisplay' mode:

~>matlab -nodisplay
~>emacs -nw

X11 Display forwarding and OpenGL

In some cases display forwarding won't work (possibly for any OpenGL program). If you get an error like:

Error: couldn't get an RGB, Double-buffered visual

or

freeglut (./myFirstGL):  ERROR:  Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow
X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  4 (X_DestroyWindow)
  Resource id in failed request:  0x0
  Serial number of failed request:  26
  Current serial number in output stream:  29

you might try this after logging into the CCRMA machine (using ~>ssh -Y <username>@ccrma-gate.stanford.edu):

~>export LIBGL_ALWAYS_INDIRECT=y

VNC

VNC instances are discouraged on CCRMA hosts. Open sessions tend to accumulate, when folks forget they've left a session running somewhere. System Admin follows up on stale sessions.

Logout

Please logout when you are not using a session.

Personal tools