This document outlines the steps you should take to connect to CS machines from off-campus.
Set up Pulse Secure to access the campus VPN.
Set up ssh for password-less access to a CS machine.
Set up x2go for GUI access to a CS machine.
This document uses the term workstation to refer to the computer to
which your keyboard and mouse are attached to. It uses REMOTE to
refer to the name (like remote.cs.binghamton.edu
) or IP address
(like 128.226.28.100
) of the remote machine and LOGIN_ID
to refer to your login ID on REMOTE.
Follow the instructions provided by ITS to set up the Ivanti Pulse Secure client on your workstation. Once set up, use it to connect to the campus VPN.
Please note that the client times out after around 4 hours and you will be disconnected abruptly. To avoid losing work, it is a good idea to ensure that you are using a GUI session on the remote machine (as outlined later in this document) so that you can resume where you left off after reconnecting the VPN client.
Connect to the campus VPN using the Ivanti Pulse Secure client.
Fire up a terminal on your workstation.
If your workstation runs Windows, then as a CS student, you
really should be using Windows SubSystem for Linux and you
should start wsl
within a PowerShell terminal. If you do
not have wsl
installed, please install it using these
instructions.
If your workstation runs OS/X, then use the OS/X Terminal application.
If your workstation runs Linux, then use any terminal application available for your distribution.
Test whether you can login to the remote CS machine.
$ ssh
LOGIN_ID@
REMOTE
LOGIN_ID@
REMOTE's password:
You should get logged in if you correctly provide your password for REMOTE at the prompt.
[You should have been provided with LOGIN_ID and password for
REMOTE. If that is not the case, please contact the
CS SysAdmin for
remote.cs.binghamton.edu
or your instructor for a
course-specific VM.]
If you are still using the password provided originally by the sysadmin or your instructor, it is imperative that you change it at once to one of your choosing:
$ passwd Current Kerberos password: New password: Retype new password:
Note that the passwords are not echoed above.
Logout from the remote machine by typing a Control-D
character.
Generate a public/private key-pair for ssh if you do not already have one on your workstation.
Check whether you already have one. In the terminal running on your workstation:
$ ls ~/.ssh/id_rsa*
If the above command shows the two files id_rsa.pub
and id_rsa
,
then you already have a public/private key-pair and you should skip
the next step.
Generate a new public/private key-pair:
$ ssh-keygen
You may choose to accept all the defaults by simply typing
<ENTER>
at the prompts.
Copy your public key to the remote computer:
$ ssh-copy-id
LOGIN_ID@
REMOTE
Test whether you can login to REMOTE without needing to specify a password:
$ ssh
LOGIN_ID@
REMOTE
You should get logged in. Review the previous steps if you are still prompted for a password.
After you have successfully completed the steps in the previous section, you should have command-line access to the remote machine. This will not be sufficient to run GUI applications like web browsers or IDE's on the remote machine. In order to run such applications, you will need to run a GUI client like x2go or vnc on your workstation.
Install a
X2Go client for
the workstation you are using to access your VM if one is not
already installed (note that a x2goclient
command is available
on remote.cs
).
Start the x2goclient
.
Create a session for connecting to your VM by clicking Session -> New session. Fill in the following fields:
LOGIN_ID@
REMOTE
REMOTE. Make sure you fill in the full name or IP address of the remote machine.
Your login id LOGIN_ID on REMOTE.
Select Try auto login (via SSH Agent or default SSH key) (this assumes that you have correctly set up password-less login from your workstation to REMOTE).
XFCE
or any type like MATE
, GNOME
appropriate to the
window managers available on REMOTE.
Once you connected your workstation to the campus VPN using the Ivanti client, you should now be able to use the above session to display a GUI desktop for REMOTE on your workstation. You should not require a password if you have set up the ssh keys correctly.
The following is a screenshot of my x2go
configuration for accessing
remote.cs
from within the campus network (or VPN):
With the above setup, I do not need to type in a password when
connecting to remote.cs
.
When disconnecting from x2go, use the Suspend control (the widget which looks like a pause control, with two lines) on the blue x2go window. This will ensure that you can pick up where you left off when you reconnect to your VM.
X2go is strongly recommended. However if you cannot get it to work, then other possibilities include:
You will need to ensure that REMOTE is running a vnc server. Then you will need to use a vnc client on your workstation to connect to the server. See Tight VNC for further documentation.
Instead of running a full remote session, you can run a X11 server on your Windows workstation. xming appears to be a popular X11 server running under Window. Apparently, xlaunch is a wizard for starting xming sessions. Since I do not use Windows, I have not tried this and YMMV.
If you cannot connect, please try the following:
Verify that your workstation's internet connection is working by accessing some web site not related to the university.
Connect your workstation to the campus VPN.
Use ssh to connect to remote.cs
. If that fails, go to the
CS SysAdmin page
for assistance.
If you are having trouble connecting to a VM, first ssh from your
workstation to remote.cs
and then ssh from remote.cs
to your
VM using its IP address. If this succeeds, then there is a
problem with x2go.
If the problem appears to be x2go, try shutting down your x2goserver using the power button on your x2goclient (If connecting to a VM, try restarting your VM).
Some students using OS/X workstations have found that:
Rebooting your mac may help.
More drastic: Reinstalling x2go and xquartz solves x2go problems.
An even more drastic workaround: If you have xquartz
installed, but x2go is not installed or not working, you can
display GUI applications running on REMOTE on your mac by
using the -Y
option when connecting to remote.cs
using
your OS/X terminal.
If all else fails, ask for help by sending your instructor an email. The email should describe your workstation's environment and detail the responses to each of the above steps.