Skip to content
Jennifer Zhang edited this page Aug 6, 2020 · 4 revisions

Welcome to the CoCode wiki!

Register Account

  1. To register for an account, go to your terminal, and run the following command: ssh [email protected]
  2. It well then prompt you for a password. Type in the following: guest
  3. Afterwards, run the command: ./guest_add_user.sh USERNAME PASSWORD, where USERNAME is the username you wish to register your account with, and PASSWORD is the account's password.
  4. After that, type exit.
  5. To test if your account has been successfully set up, run the following command: ssh [email protected] , where USERNAME is your new username. Enter your password when prompted. If you see USERNAME@ubuntu-cocode:~$, then that means you have successfully made an account.
    • NOTE: Because of limited space, there is a maximum number of users. If you're running into issues registering for an account, feel free to open an issue.

Adding SSH Key

To properly use our application, you must have an SSH key set up for your account.

  1. First, generate a key. To do so, open up your terminal, and run the following command: ssh-keygen. Press enter three times.
  2. After you have generated your key, run the following command: ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected], where USERNAME is your username.
  3. Now the SSH key should be set up. Try running ssh [email protected]. If it doesn't prompt you for a password, then the SSH key was successfully set.

Pushing a File

To push a file, take this code, and compile and run it. The usage is ./a.out <username> <password> <file to upload>

For example:

$ ls
git_client_linux_push.cpp  hello_world.txt

$ g++ git_client_linux_push.cpp -o client_push.exe

$ ./client_push.exe username password hello_world.txt
connecting to server.....
Successfully logged in
bytes received: 10
FILE found
File successfully sent to server.
Clone this wiki locally