Logging In - How to login to the dokku server unix command line
This page explains how to login to the Dokku command line.
If you already know your dokku host, and have configured your account to access dokku, it should be as simple as this:
- Login to CSIL
- From there, type ssh dokku-nn.cs.ucsb.edu where you replace nn with the correct number.
If that doesn’t work for you, then consult the instructions below; you may have missed one of the set up steps.
Which Host?
You’ll need to know which Dokku server you were given access to. There will typically be a mapping from your team name to your Dokku instance such as the one below. Staff have access to the dokku-00.cs.ucsb.edu instance, and all other servers. Students typically have access to only one server, namely the one for their team.
From F24 forward, we typically map the dokku servers by team number, e.g.
- team
01is assigned todokku-01.cs.ucsb.edu - team
02is assigned todokku-01.cs.ucsb.edu - …
- team
16is assigned todokku-16.cs.ucsb.edu
SSH setup
There are three steps you need to do to get your account set up for access to Dokku:
-
Make sure your CSIL account has the following files in place:
~/.ssh/id_rsa.pub(public key; may be freely shared with anyone)~/.ssh/id_rsa(private key; never share with anyone)
If these files don’t exist in your account, you can run
ssh-keygenat the CSIL shell prompt; just hit enter to accept all defaults. After running thessh-keygencommand, if you use the defaults, those files should then exist. -
Type these two commands after you create your ssh public key:
touch ~/.ssh/authorized_keys cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keysThese commands allow you to login to any CSIL machine from any other without having to supply a password (more precisely, from any CSIL machine to another that mounts your same home directory) This is what will permit you to login to your dokku machine.
-
Try logging in with:
ssh dokku-nn.cs.ucsb.edu where you replace nn with the correct number.
If it still doesn’t work, ask for help
Troubleshooting Dokku Issues
-
Are you remembering to login to CSIL first?
The correct procedure to login to dokku is to first login to CSIL, e.g.
ssh csilusername@csil.cs.ucsb.eduAnd only then login to dokku:
ssh csilusername@dokku-xx.cs.ucsb.eduAlternatively, you can use the “jump” option to combine these into one command:
ssh -J csilusername@csil.cs.ucsb.edu csilusername@dokku-xx.cs.ucsb.edu -
Double check that you are using the correct dokku number, and not copy/pasting a command with
dokku-xxin it. -
Make sure you are using your CSIL username, and not your Github username.
-
Go through all of the steps to set up your ssh key again (see top of this page). It’s possible you made a typo at some step, so repeating these steps often fixes things.
-
Ask the professor to make sure that you are listed in the
/home/eci/dokku_users_listfile correctly.