My work has set up an Ubuntu server for my team to host a project on. They set up a sudo user for me with my name as the username, and a default password. I was able to SSH into the server using these original username and password.
Since my whole team would be accessing the server, I wanted to change the username and password so that it wasn't my name, but instead the project name. After doing so, I think I was still able to SSH in using the new username and password. However, now when I try to SSH in I get the error
ssh: connect to host xxx.xx.xx.xx port 22: Connection refused.
The server was set up so that it can only be accessed from any of our office's networks. Is this sudden refused connection due to me changing the username and password (maybe something to do with the RSA keys, I don't know), or else is it more likely to be an issue with firewalls or my office's network?
Here is a detailed description of the process I took to change the username from 'abc' to 'xyz':
- While logged in as user 'abc', I tried to run
sudo usermod -l xyz abc, but I couldn't as it said
process abc is already running.
- I then created a new user named 'temp' with sudo access.
- I SSHd in as 'temp', ran
sudo usermod -l xyz abcwithout any errors.
- I then SSHd in with 'xyz' successfully, deleted user 'temp' and ran
passwdto change xyz's password.
- I'm pretty sure I exited from SSH, then successfully SSHd in again with the new username and password, but I may be wrong here - I can't remember.