Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

cklester's avatar

Add User to Forge Server

I can ssh into my server with "[email protected]," but I've added another user to the system (via "adduser...") and am trying to ssh into the server with THAT user, but it doesn't seem to want to. I've added a separate SSH key to the server, because attempting to login with the new username and forge's SSH key results in "Permission denied (publickey)." This is also the error I get when trying to use the new username with the new SSH key.

So, is it possible to add users to the server? Am I restricted to just using the forge user?

0 likes
6 replies
cklester's avatar

Hi, @jlrdw ! Thanks for the help.

It looks like that thread ended without a resolution. What I'm trying to figure out is, can I add a user to my DO server via Forge, then login via ssh with that user?

I've added the user. But now I can't ssh into the server with that user, despite having attempted to use 1) the current ssh key, and 2) a new ssh key.

Currently, I can ssh into my Forge/DO server with the 'forge' user. I want to add a user. Can that use utilize the same ssh key? Do I need to generate a new one? Can I even add a new user to the Forge/DO server?

I've got a message or two into Forge support, but haven't heard anything, yet.

randomcast1's avatar

i think every user should be able to login as them and have their own server configuration, minimally so their git commits wouldn't get messed up (talking about dev severs not production)

so i have this thing that i've been menaing to put ina script forever lol

adduser [username]
usermod -g forge [username]
echo '' >> /home/[username]/.bashrc
echo 'umask 0002' >> /home/[username]/.bashrc
echo 'cd /home/forge' >> /home/[username]/.bashrc
mkdir /home/[username]/.ssh
echo 'THEIR_KEY' >> /home/[username]/.ssh/authorized_keys
chown [username]:forge /home/[username]
chown [username]:[username] /home/[username]/.ssh
chown [username]:[username] /home/[username]/.ssh/authorized_keys

git config --global --add safe.directory '*'
git config --global user.name "username"
git config --global user.email "[email protected]"

//add id_rsa and id_rsa.pub 

now we can check correctness of the user

cat /etc/passwd
should be like 
USERNAME:x:SOMEID:1000::/home/USERNAME:/bin/bash

Please or to participate in this conversation.