Here, we document how to configure quadcorn
for remote access.
We mostly followed the instructions here.
Setup user accounts on quadcorn
>> sudo useradd -m --create-home USERNAME
Choose password:
>> sudo passwd USERNAME
See here if you forgot -m
.
Once you have created the users, setup the usergroup.
>> sudo groupadd -r GROUPNAME
Add each user to the group.
>> sudo usermod -a -G GROUPNAME user1
>> sudo usermod -a -G GROUPNAME user2
Start the SSH service.
>> /etc/init.d/ssh start
Open the SSH Daemon config file.
>> atom /etc/ssh/sshd_config
Add the following lines to only allow our user group:
#Which groups of users to allow
AllowGroups GROUPNAME
Edit the port number with a custom PORT_NUMBER:
#What ports, IPs and protocols we listen for
#Port 22
Port PORT_NUMBER
Check that X11 forwarding is set to yes:
X11Forwarding yes
We used:
GROUPNAME=kordinglab
PORT_NUMBER=5000
Once this is done, just restart the ssh server:
sudo service ssh restart
The IP address of our server will be given to you.
To login to the server, type:
>> ssh -X -p PORT_NUMBER USERNAME@IP_ADDRESS
But we can do better than remembering all these details. We need to let the ssh program know the host IP address, the user login, and the port to listen to. To do so, create the ~/.ssh/config
file:
>> atom ~/.ssh/config`
Type in the following:
Host quadcorn
HostName IP_ADDRESS
ForwardX11 yes
Compression yes
Ciphers blowfish-cbc
Port PORT_NUMBER
User USERNAME
Now we can simply do this instead:
>> ssh quadcorn
This replaces the much more cumbersome option where you need to remember everything.
Once you login to quadcorn
,
to make sure that you can use most of the installed software,
you need to edit your ~/.profile
file.
>> atom ~/.profile
Now add the following lines:
# set PATH to include anaconda global directory
PATH="/opt/anaconda/anaconda2/bin:$PATH"
# set PATH, LD_LIBRARY_PATH for cuda
export PATH="/usr/local/cuda/bin:$PATH"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64"
# to get the bash shell, otherwise you get `/bin/sh` by default
/bin/bash
To test that the path to python is set correctly, type:
>> which python
You should see:
/opt/anaconda/anaconda2/bin/python
To test whether cuda is installed correctly, type:
>> nvcc -V
You should see something like:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_14:27:32_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17