当我在某些节点中创建一个新环境时,(即使用 Nginx)我无法使用 root 用户访问该节点
我登录的用户不是 root。
Using username "251X-XXX".
Authenticating with public key "rsa-key-XXXXXXXX"
Last login: Thu Sep 28 09:11:56 2017
nginx@node251X-delete ~ $ sudo date
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for nginx:
Sorry, try again.
简介:
- 我的电子邮件没有收到根密码(我是这个环境的所有者)。
- 我无法将此节点更改为 Docker 镜像
- 控制面板上没有重设密码选项
- Sudo 它不起作用。
- 其他非 docker 节点(Tomcat、MySQL 等)也会发生这种情况
以根用户身份进入此节点的任何替代方案或配置。
谢谢
最佳答案
Jelastic 不提供对单独容器的根访问权限。同时,通过 SSH 访问容器时,用户会获得所有必需的权限,并且还可以使用以下类型(和其他)的 sudo 命令管理主要服务:
sudo /etc/init.d/jetty start
sudo /etc/init.d/mysql stop
sudo /etc/init.d/tomcat restart
sudo /etc/init.d/memcached status
sudo /etc/init.d/mongod reload
sudo /etc/init.d/nginx upgrade
sudo /etc/init.d/httpd help
例如,您可以使用以下命令重启nginx:
sudo /etc/init.d/nginx restart
不需要密码。
Note: If you deploy any application, change the configurations or add any extra functionality via SSH to your Jelastic environment, this will not be displayed at the Jelastic dashboard.
使用我们的文档,您将了解如何:
关于ssh - 无法在 Jelastic 环境的 native 模板中使用 root 用户登录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46465779/