Root login

From MineOS Wiki
Jump to navigation Jump to search

Logging in remotely as root (via SSH, SFTP) is turned off by default. This is a rather standard convention of Linux and BSD environments, done with security in mind. MineOS Turnkey, which is based on Turnkey Linux (which is based on Debian) is no exception to this rule.

When trying to upload files, often the destination directory will be root-owned, and any attempt to move files within is greeted with Permission Denied. One prescribed way to do this, such as uploading archives to /var/games/minecraft/import is to upload these files via SFTP with an unprivileged user and relocate the file with elevated privileges in SSH:

Moving files to the import directory

All webui commits beyond August 30, 2015 will auto-chown 777 the import directory, /var/games/minecraft/import. This means unprivileged users can upload server archives directly to this directory already. This is the preferred way to upload files to the server to be detected by MineOS.

Permitting Root Login

PuTTY (and numerous other services, like SFTP) all connect through sshd. As a security precaution and Linux convention, root logins directly to SSH or SFTP are disabled, to make it impossible to brute-force into root.

If it is essential that you are able to log into these services directly as root, you may do so by editing the /etc/ssh/sshd_config configuration file.

Find and un-comment the line "PermitRootLogin" and change the value to yes:

<syntaxhighlight> PermitRootLogin yes </syntaxhighlight>

You must then restart the sshd service with:

RSA Key Login

The preferred way of doing this, however, is to employ an RSA-key security mechanism. This will allow root login, but not have the pitfalls of passwords that can be mistyped or stolen.

This process is more involving than simply allowing root login, but it is the more secure route and a better practice for a server admin.

Click here to see a Youtube video about RSA-key (password-free) SSH Login.

Other notes

Keep in mind, as MineOS Turnkey is just a rebranded Turnkey Linux, which is just a rebranded Debian Linux, you can use any online tutorials or guides you may find for Debian-based distributions, which includes Ubuntu Linux as well. In other words, you are not limited to these above methods, even if they are the only ones this wiki lists.