How to SSH login as root to virtual server

🛈 SYSTEM INFORMATION
OS type and version Ubuntu Linux 18.04.6
Webmin version 1.984

Hi,

I am trying to SSH as root to a specific virtual server, can anyone suggest how I can do it?

I added my SSH in Putty for instance, and it logs into the terminal, but then when I tried “sudo root” at the terminal & I used the same password as the subaccount (when I created the virtual server), I am getting an error “domain.net is not in the sudoers file. This incident will be reported.”

I am just trying to be root on the specific virtual server (not the main one where Webmin is installed).

Thank you!

Simply login as root?

ssh -v root@host.name

I used the same password as the subaccount (when I created the virtual server), I am getting an error “domain.net is not in the sudoers file. This incident will be reported.”

Simply add your user account to admin (wheel) group to be able to use sudo with it. Although it’s not very clear why do you need this… if you need to work as root, just login as root.

Yes just login as root, thanks

Simply add your user account to admin group to be able to use sudo with it. Although it’s not very clear why do you need this… if you need to work as root , just login as root .

I was trying to install some scripts as root on the virtual server.
Got it, thanks!

Umm, wait, what? This sound like a bad idea.

Maybe I am getting it wrong, i am trying to create a /var/www/html/plugin-name folder and the only way I found it is with sudo : |

Maybe you are right and I got it wrong on installing this plugin on the server .

If you installed Virtualmin using official install.sh script on a clean system then all is good. If not, consider reinstalling, as it would be a fastest and easiest solution.

Maybe I am getting it wrong, i am trying to create a /var/www/html/plugin-name folder and the only way

That looks like a standard Apache directory. In case Virtualmin was installed properly, you should never associate your virtual server with anything outside of its home, which is by default set to /home/domain.name directory. The issue that you’re experiencing is either a network/Apache misconfiguration or, most likely, you simply forgot to enable Apache SSL website feature for the domain on Edit Virtual Server page (while trying to use it).

1 Like

thanks a lot @Ilia for the advice. Yes, I think the issue was that I did not enable Apache SSL website , thanks!

i use
ssh root@myserver.it

and then
su username_virtualserver

Thanks @ale.ab!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.