The package sims_catUtils
interfaces with a MS SQL Server database at UW containing simulated catalogs of stars, galaxies, solar system objects.
For security reasons, this database is only available for direct connection from within the University of Washington campus. To connect from off campus, you must create an ssh tunnel through the publicly-facing machine gateway.astro.washington.edu
using a shared account that has been created for this purpose. This requires a couple steps to authenticate.
connection parameters and passwords subject to change
The following instructions outline how to connect from off campus. The instructions assume that your favorite port number is 51433 (any free port number should do) and that you have installed the stack and setup sims_catUtils:
source $INSTALL_DIR/loadLSST.sh # bash users where $INSTALL_DIR is where the LSST Stack was installed eups distrib install lsst_sims -t sims # install sims utilities setup sims_catUtils -t sims # set up package
Step 1) SSH Tunnel from Off Campus
First open an ssh tunnel, using local port forwarding switch -L. From any terminal on your machine:
Your local ssh client will connect to the remote ssh server (gateway) and bind the local port 51433 to remote port 1433 of the server hosting the database (fatboy).
First time connecting?
For access to the shared UW account, please send your public ssh key to Bryce Kalmbach (brycek at uw dot edu)
Step 2) Change default connection parameters
Now edit the file that contains the default connection parameters: $SIMS_CATUTILS_DIR/config/db.py
so that it knows to connect to your local port 51433. Note: you may not actually need to edit this file, depending on the version of the stack you have installed. Regardless, it should look like the code below.
Step 3) SQL Server Authentication
The previous steps provide network access to the server, but a password is required to connect to the database instance. A shared read-only SQL Server account is available for querying the catalogs. The LSST stack requires that passwords be stored in a file located in your home directory.
Create a $HOME/.lsst/db-auth.paf
file with the following content. The port should be your local port that you chose when creating the ssh tunnel.
database: { authInfo: { host: localhost port: 51433 user: <shared username> password: <shared password> } }
Authorization information for more than one database server may be included for example:
The directory $HOME/.lsst
must have 700 permissions and these files must each have 600 permissions (go-rwx in all cases).
cd $HOME chmod 700 .lsst chmod 600 .lsst/db-auth.paf
What should you put in place of the user and password? UW Database Credentials
If you do not have access to the above link, the SQL Server account details will be given to you when you send your ssh key to Bryce Kalmbach .