Connecting to the Lab Computers Remotely

From AstroBaki
Jump to navigationJump to search

Remote Connecting

Windows Terminals

If you are using a Windows machine it is strongly recommended you download a UNIX-like terminal. Below are some that are easy to set up.

Git Bash (easiest)

Download Link

Windows Ubuntu Subsystem

Installation & Setup Guide

SSH Commands

To normally connect, run the command ssh <username> in your terminal. <username> is the username you use to log into the lab computers.

Jupyter Notebook

1) ssh -N -L <PORT>:localhost:<PORT> <username> where <PORT> is a number between 1024 and 32,767 you choose semi-arbitrarily so it hopefully is not already in use by another student.

2) Leave that terminal alone and open another terminal window and ssh <username> as you would do normally.

3) In that second terminal run the command jupyter notebook --no-browser --port=<PORT> where you use the same port number as you did in step 1).

4) Now in the web browser of your choice you should be able to access Jupyter Notebook by copy & pasting the url it provides for you in the terminal window.

X window interface

You can also connect to the remote server with the command

ssh -X <username>

to enable the x window server. This will let you run python and ipython commands that plot and have them displayed on your screen.

Changing the port/server

The default port for ssh connection is port 22. This is a well known fact in the networking world and so often times system administrators will change the ssh port to hinder unwanted probes and increase the network's security. The port can also be used to allow connections to multiple machines. This year there will be two servers running on the network. If your radio astronomy work seems to be taking a while to process you might want to see if someone else is using the server with the command


you can also check the resources available with the command


If the server is being used by others then you might want to use the other server. This server can be accessed using an alternative port with the ssh command

ssh -p <port number> <username>