Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions docs/zh/docs/en/zestu/instance/ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,28 @@ Using SSH, users can securely access container instances on the platform from th

## Log in to a Container Instance Using SSH Username/Password

1. In the container’s terminal, install the `openssh-server` service.
1. In the container instance's terminal, check whether the SSH server is installed.

If it's already installed, you may skip this step and proceed to Step 2.

- Run the following command to install the SSH server:

```bash
apt-get update && apt install openssh-server
```

- Verify the installation:
```bash
command -v sshd
```

- Check for SSH processes:
If this returns the path to `sshd`, skip the installation.
Otherwise, run `cat /etc/os-release` to identify the container image's Linux distribution, then run the matching installation command as root.

```bash
ps -e | grep ssh
```
| Linux distribution | Installation command |
| --- | --- |
| Debian / Ubuntu | `apt-get update && apt-get install -y openssh-server` |
| Fedora / Rocky Linux / AlmaLinux | `dnf install -y openssh-server` |
| CentOS / RHEL images using yum | `yum install -y openssh-server` |
| Alpine Linux | `apk add --no-cache openssh-server` |

- Check installed packages:
After installation, run `command -v sshd` again to confirm that the server executable is available.
Installing only `openssh-client` or finding `ssh` in a package list does not confirm that the SSH server is installed.

```bash
dpkg -l | grep ssh
```
Before logging in, also ensure that the SSH server is running, using the image's startup mechanism.
Installing the package does not mean the service has started, and container images do not necessarily use systemd.
See [Service Auto-start](service-auto-start.md) to configure services in a container instance.

2. After the container starts, click the **SSH Login** button in the container instance list to open a dialog with login information.

Expand Down
35 changes: 17 additions & 18 deletions docs/zh/docs/zestu/instance/ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,28 @@ SSH(Secure Shell)是一种网络协议,用于在不安全的网络中安

## 使用 SSH 用户名/密码登录容器实例

1. 在打开的 Terminal 终端中,安装 openssh-server 服务。
1. 在容器实例内部的 Terminal 终端中,检查是否已安装 SSH 服务端。

若已安装可跳过此步骤,直接进入步骤二。

1. 执行如下命令,安装 openssh-server 服务。

```shell
apt-get update && apt install openssh-server
```

1. 检查安装是否成功。
```shell
command -v sshd
```

* 检查 ssh 进程。
如果返回 `sshd` 的路径,说明已安装,可跳过安装步骤。
否则,先运行 `cat /etc/os-release` 查看容器镜像的 Linux 发行版,再以 root 用户运行对应的安装命令。

```shell
ps -e | grep ssh
```
| Linux 发行版 | 安装命令 |
| --- | --- |
| Debian / Ubuntu | `apt-get update && apt-get install -y openssh-server` |
| Fedora / Rocky Linux / AlmaLinux | `dnf install -y openssh-server` |
| 使用 yum 的 CentOS / RHEL 镜像 | `yum install -y openssh-server` |
| Alpine Linux | `apk add --no-cache openssh-server` |

* 检查安装包。
安装后,再次运行 `command -v sshd` 确认服务端程序可用。
仅安装 `openssh-client` 或在包列表中找到 `ssh`,不能证明已安装 SSH 服务端。

```
dpkg -l | grep ssh
```
登录前还需确保 SSH 服务端已使用镜像的启动方式启动。
安装软件包不代表服务已启动,容器镜像也不一定使用 systemd。
参阅[服务开机自启动](service-auto-start.md)配置容器实例中的服务。

2. 容器启动后,在容器实例列表中点击 SSH 登录按钮,打开弹窗复制 SSH 的登录信息。

Expand Down
Loading