This Open OnDemand application provides a web-based terminal that connects the user through an SSH session to either the local machine or any other machine allowed within the internal network. Typically this will connect the user to a login node. This application uses Node.js for its exceptional support of websockets providing a responsive user-experience as well as its event-driven framework allowing for multiple sessions simultaneously.
This app is deployed on the OnDemand Server under the following path on the local file system:
and can be accessed with the following browser request:
Starts SSH session on
hostmachine with current working directory
GET /pun/sys/shell/ssh/default HTTP/1.1 Host: ondemand.hpc.edu
Starts SSH session on the default host (specified by system administrator when app was first installed) in the user’s home directory.
GET /pun/sys/shell/ssh/node01.hpc.edu/home/user/path/to/work HTTP/1.1 Host: ondemand.hpc.edu
Starts SSH session on host
node01.hpc.eduand changes working directory to
How it Works¶
Requirements needed for the Shell App to work on your local HPC network:
- OnDemand Server
- An SSH Server running on the host machine that the Shell App connects to
Fig. 4 details how the Shell App works on a local HPC system.
The user’s PUN running on the OnDemand Server launches the Node.js Shell App
through Passenger as the user. The Shell App then forks off an
that then connects to a server specified by the administrator (typically a
login node). The
stderr streams are all piped
through the websocket connection. When the user drops the websocket connection
(e.g., leaves the page, refreshes browser, drops connection) the
process is terminated.