Login
In order to access the login nodes, users must have a valid Duke NetID and password, be enrolled in the Multi-Factor Authentication (MFA) system, and have a valid CS account. If you are not a CS member please see the accounts page to request access.
Acceptable use of login nodes include:
- job submission and monitoring
- script and file editing
- file transfers
SSH Access
Login to the CSC using ssh netid@login.cs.duke.edu
netid@laptop ~ % ssh netid@login.cs.duke.eduPassword:Duo two-factor login for netid
Enter a passcode or select one of the following options:
1. Duo Push to XXX-XXX-12342. Phone call to XXX-XXX-12343. Phone call to XXX-XXX-43214. SMS passcodes to XXX-XXX-1234 (next code starts with: 2)
Passcode or option (1-4): 1Success. Logging you in...Last login: Tue Mar 21 11:07:41 2024 from xxxnetid@login ~ $
SSH Keys
Once you have the Terminal open, use the following command to generate a key-pair:
ssh-keygen -a 100 -t ed25519 -f ~/.ssh/id_ed25519
The command will prompt you to enter a passphrase for the key-pair. It is recommended you enter a passphrase but it is not required. The key files should now be generated in your home directory under the .ssh directory. The key filenames will be id_ed25519 and id_ed25519.pub.
Once you have your keys generated, the public key must now be copied to the host you wish to log in to. The easiest way to do that is by issuing the following command:
ssh-copy-id -i ~/.ssh/id_ed25519.pub netid@login.cs.duke.edu
You will be prompted for your password to login.cs.duke.edu. Once the command is run correctly, you should be able to ssh into login.cs.duke.edu without entering your password.
OIT SSH Keystore
You can attach your public SSH key to your Duke account at the Account Self-Service portal. This will enable you to use your SSH keys to connect to Duke servers, as well the CS login server (login.cs.duke.edu).
To set this up, navigate to https://idms-web-selfservice.oit.duke.edu/advanced and log in with your NetID and password.
Under the ‘Manage Your Public SSH Keys’, select the ‘See More about SSH keys’ and paste in your public key and ‘Add Key’.
SSHing to compute nodes
Once you have set up an ssh key, you can log into compute hosts where you have jobs running. For instance:
wg245@linux45:~$ squeue -u wg245JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)3871647 compsci-g bash wg245 R 5:09 1 linux45
User wg245 could log into linux45 since they have a job running there. If you try to log into a host without a job running, you will get the message:
❯ ssh linux46Access denied by pam_slurm_adopt: you have no active jobs on this nodeConnection closed by 10.236.184.97 port 22
The resource limits specified in the job will also be in effect for the login session.