Thursday, January 2, 2020

SSH as root login - GoDaddy VPS



I'm having trouble finding the solution to my problem, which I believe is just a noob thing. I've just set up my first VPS using WHM and CPanel. I'm using Putty for SSH access.




I can login to SSH with my CPanel account (not root account). I need to configure some files that I believe are only accessible as the root/sudo user, such as: /etc/ssh/sshd_config among others. From WHM under SSH Password Authorization Tweak, it says that Password Authentication is enabled, but I cannot login as root via SSH. I get access denied. I also cannot sudo su my regular acct because it says the user is not in the sudoers file. I can't add them to the file because I don't have access to it without logging in as the root user.



Finally, I have tried using SSH keys set up via WHM, but the server refuses the signature despite accepting accepting the key and then asks me for root password, where I once again get Access Denied.



How am I supposed to change files that only the root/sudo user have access to but I cannot SSH as root or sudo user without initial root access?? This is nuts. I really think I'm missing something obvious here, but I just don't know what. Thanks so much for your help.



This is kind of lame in my opinion to be an actual solution to the problem, but I did finally figure out how to login to my account with root access. I am hosting with GoDaddy and when you set up your virtual private server with them, you are asked to create a user for your server, which I did. What I did not realize when performing this step is that the username I selected would also be the username I needed to use in ssh for root access. I was trying to log in with root as the username and failing. When I finally tried logging in with the username that GoDaddy asked me for when creating my VPS, I was able to login with root access. I decided to post my answer in case anyone else runs into this very issue. I also added "GoDaddy" to my question realizing that this issue could be isolated to the way they set you up with a VPS (and don't support btw).



Many thanks to @ulovah for all your help. You helped me rule out many possibilities.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...