Cloud9 on Existed Instance
Install Libraries
Create Cloud9 User
sudo su
AUTHORIZED_KEYS="<AUTHORIZED_KEYS>"
useradd cloud9
echo "1234" | passwd --stdin cloud9
mkdir -p /home/cloud9/.ssh
echo $AUTHORIZED_KEYS > /home/cloud9/.ssh/authorized_keys
chown -R cloud9:cloud9 /home/cloud9/.ssh
echo "cloud9 ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/90-cloud-init-users
exit
sudo su
AUTHORIZED_KEYS="<AUTHORIZED_KEYS>"
useradd -m -s /bin/bash -p $(openssl passwd -1 1234) cloud9
mkdir -p /home/cloud9/.ssh
echo $AUTHORIZED_KEYS > /home/cloud9/.ssh/authorized_keys
chown -R cloud9:cloud9 /home/cloud9/
echo "cloud9 ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/90-cloud-init-users
exit
Install Node.js
sudo -S su cloud9
cd ~
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
. ~/.bashrc
nvm install 16
node --version
npm --version
npm install -g npm c9
whereis node
exit