Add More Users to Your VM Instance
Once you have gained SSH access to your Instance (as "cades"), additional users can be created through the Bash terminal. The CADES OpenStack Instances leverage ORNL's UCAMS system to enable customers to create UCAMS users and home areas on their Instances. The following procedures will enable you to create a new user on your VM Instance and grant access using SSH key pairs.
Add a UCAMS User
Because your Instance can access ORNL's UCAMS system, you can easily add a UCAMS user to your Instance. You can start with your own UCAMS ID to verify functionality and then move on to adding the UCAMS IDs of your collaborators (using their public SSH keys that they must provide to you).
- Open a Bash terminal.
- Upload a copy of your (or your collaborator's) public key (
blackmesakey.pub
in this case),$ scp ~/.ssh/blackmesakey.pub cades@128.219.186.39:/home/cades
. Replace128.219.186.39
with the IP address of your Instance. - Using SSH, log in to your VM Instance as "cades".
- Once logged in, become root,
$ sudo -s
. - Create the home directory for the UCAMS ID,
$ su - UCAMS
. Replace "UCAMS" with the desired UCAMS ID. - Use
cat
and>>
to copy the contents of your public SSH key to/home/UCAMS/.ssh/authorized_keys
.
SSH commands for the above procedure are provided below. First:
$ scp ~/.ssh/blackmesakey.pub cades@128.219.186.39:/home/cades
Then:
$ ssh cades@128.219.186.39
$ sudo -s
$ su - UCAMS
$ cat /home/cades/blackmesakey.pub >> /home/UCAMS/.ssh/authorized_keys
Properly configured, you can now access your VM Instance over SSH using your UCAMS ID (instead of "cades"). Execute the command shown below (replace "UCAMS" with your own UCAMS ID).
$ ssh UCAMS@128.219.186.39
📝 Note: You will not be prompted for your UCAMS password. This process uses SSH key pairs for authentication.
Add a Non-UCAMS User
In some cases, it may be useful to have a generic user (not affiliated with UCAMS) on your VM Instance. The following procedure outlines how to create such a user.
- Open a Bash terminal.
- Upload a copy of your (or your collaborator's) public key (
blackmesakey.pub
in this case),$ scp ~/.ssh/blackmesakey.pub cades@128.219.186.39:/home/cades
. Replace128.219.186.39
with the IP address of your Instance. - Using SSH, log in to your VM Instance as "cades".
- Once logged in, become root,
$ sudo -s
. - Add a new user,
useradd USERNAME
. - Create a password for this user,
passwd USERNAME
.- Enter desired password. Reenter password to confirm.
- Create the home directory for the generic user,
$ su - USERNAME
. Replace "USERNAME" with the desired user name. - Use
cat
and>>
to copy the contents of your public SSH key to/home/USERNAME/.ssh/authorized_keys
. Replace "USERNAME" with the desired user name.
SSH commands for the above procedure are provided below. First:
$ scp ~/.ssh/blackmesakey.pub cades@128.219.186.39:/home/cades
Then (replacing "USERNAME" with your desired username):
$ ssh cades@128.219.186.39
$ sudo -s
$ useradd USERNAME
$ passwd USERNAME
$ su - USERNAME
$ exit
$ sudo -s
$ cat /home/cades/blackmesakey.pub >> /home/USERNAME/.ssh/authorized_keys
Properly configured, you can now access your VM Instance over SSH using your newly created username (instead of "cades"). Execute the command shown below (replace "USERNAME" with your new username).
$ ssh USERNAME@128.219.186.39
See the Access Your VM Instance documentation for instructions on how to use SSH and Horizon to access your Instance.