2

Yesterday, I was busy setting up my server and securing it. I am a noob at code, programming and webhosting, but I am trying to host my own website. So yesterday I changed some settings in the sshd_config file. One of the lines i changed was ''PermitRootLogin'' I have that set to ''no'' right now.

Now I want to login to my server again, to make more changes, but the login method I am used to:''ssh root@server_IP'' gives me the output: Permission denied.

I can't login to my remote server anymore how I used to. So as far as I know off, I can only connect to my server with my sftp account, but that doesn't allow me to really update the server and install new software etc.

So how can I connect to my server again, as an admin, a root user? I don't know how to open the /etc/ssh/sshd_config file since I am not connected as the root user to my server

If somebody can help me, Thanks a bunch!

  • 1
    typically through a rescue system or virtual terminal that your VPS hoster provides – frostschutz Feb 24 at 12:46
  • When you make a change to sshd_config, you can keep your current session open and test that your changes don't prevent you to login again. But I guess you'd do that now. – Christophe Drevet-Droguet Feb 24 at 13:07
  • is there any other user on the system? if so, does that user have sudo privileges? – BANJOSA Feb 24 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.