ssh - 无法在 Jelastic 环境的 native 模板中使用 root 用户登录

标签 ssh root jelastic

当我在某些节点中创建一个新环境时,(即使用 Nginx)我无法使用 root 用户访问该节点

enter image description here

我登录的用户不是 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.

使用我们的文档,您将了解如何:

use SFTP and FISH protocols

manage containers via SSH with Capistrano

关于ssh - 无法在 Jelastic 环境的 native 模板中使用 root 用户登录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46465779/

相关文章:

ubuntu - 无法在 Vagrant 中运行 ubuntu/trusty32

android - 如何从root重新启动adb到用户模式?

java - 上传的用户个人资料图片存储在哪里?

linux - 如果管理员没有将 ssh 服务端口设置为默认 22,我如何找到他设置的端口?

java - 如何使用 ssh 和 key 授权 CRaSH

c - 试图了解缓冲区溢出和 setuid。我没有特权

postgresql - 更改 Jelastic 上 PostgreSQL 节点上的 shared_buffers 值

tomcat - 在 Jelastic 上自动重启 Tomcat

perl - 尝试安装 Net::OpenSSH 但取回无效版本的依赖项

android - 在没有 Root 或警告的情况下在 Android 上安装 Trust Bundle 证书