From 14e955749975ce09da2deed7db326fe45675921f Mon Sep 17 00:00:00 2001 From: dettlaff Date: Wed, 30 Aug 2023 21:42:51 +0400 Subject: [PATCH] refactor: add tabs to ssh how to --- .../en/docs/How To Guides/root_ssh/_index.md | 21 +++++++++++++--- .../ru/docs/How To Guides/root_ssh/_index.md | 25 ++++++++++++++++--- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/content/en/docs/How To Guides/root_ssh/_index.md b/content/en/docs/How To Guides/root_ssh/_index.md index 04e39bb..f2041bc 100644 --- a/content/en/docs/How To Guides/root_ssh/_index.md +++ b/content/en/docs/How To Guides/root_ssh/_index.md @@ -12,7 +12,10 @@ To access your server's root shell you will have to generate your SSH key and ad ## How to generate SSH key -### Unix-like systems (PC) + +{{< tabpane text=true >}} + {{% tab "Unix-like systems (PC)" %}} +### If you are Unix-like system user 1. Open the terminal. 2. Run the following command: @@ -27,7 +30,10 @@ To access your server's root shell you will have to generate your SSH key and ad ``` 4. Refer to the next section to add the key to your server. -### Windows +{{% /tab %}} + + {{% tab "Windows" %}} +### If you are Windows user 1. Open settings and under "Applications" click on "Manage additional components". 2. Press "Add Component". @@ -46,7 +52,11 @@ To access your server's root shell you will have to generate your SSH key and ad Once again, replace `user_name` with your Windows username. 7. Refer to the next section to add the key to your server. -### Android (Termux) + +{{% /tab %}} + + {{% tab "Android (Termux)" %}} +### If you are Android (Termux) user 0. Install [Termux](https://termux.dev/en/). We recommend installing it from F-Droid. 1. Open Termux. @@ -63,6 +73,10 @@ To access your server's root shell you will have to generate your SSH key and ad ``` 4. Refer to the next section to add the key to your server. +{{% /tab %}} +{{< /tabpane >}} + + ## How to add the key to your server 0. Open the SelfPrivacy app. @@ -78,6 +92,7 @@ To access your server's root shell you will have to generate your SSH key and ad {{< imgproc more-superuser Fill "1001x808" />}} + ## How to access your server's root shell via SSH 1. Open the terminal or Command Prompt. diff --git a/content/ru/docs/How To Guides/root_ssh/_index.md b/content/ru/docs/How To Guides/root_ssh/_index.md index 2874d2f..015b7fe 100644 --- a/content/ru/docs/How To Guides/root_ssh/_index.md +++ b/content/ru/docs/How To Guides/root_ssh/_index.md @@ -12,7 +12,10 @@ categories: ["How-To Guides"] ## Как сгенерировать SSH-ключ -### Unix-подобные системы (ПК) + +{{< tabpane text=true >}} + {{% tab "Unix-подобная система (ПК)" %}} +### Если вы используете Unix-подобную систему 1. Откройте терминал. 2. Выполните следующую команду: @@ -20,6 +23,7 @@ categories: ["How-To Guides"] ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 ``` Вам будет предложено ввести кодовую фразу. Вы можете оставить ее пустой, но рекомендуется все-таки использовать пароль. + Если вы не хотите использовать кодовую фразу, просто нажмите **Enter**. 3. Выведите открытый ключ в терминал и скопируйте его: ```bash @@ -27,7 +31,10 @@ categories: ["How-To Guides"] ``` 4. Обратитесь к следующему разделу, чтобы добавить ключ на ваш сервер. -### Windows +{{% /tab %}} + + {{% tab "Windows" %}} +### Если вы Windows пользователь 1. Откройте настройки и в разделе "Приложения" нажмите на "Управление дополнительными компонентами". 2. Нажмите "Добавить компонент". @@ -38,6 +45,7 @@ categories: ["How-To Guides"] ssh-keygen -t ed25519 -f C:\Users\user_name\.ssh\id_ed25519.pub ``` Вам будет предложено ввести кодовую фразу. Вы можете оставить ее пустой, но рекомендуется использовать кодовую фразу. + Если вы не хотите использовать кодовую фразу, нажмите **Enter**. 6. Выведите открытый ключ на терминал и скопируйте его: ```ps1 @@ -46,7 +54,10 @@ categories: ["How-To Guides"] Еще раз, замените `user_name` на ваше имя пользователя Windows. 7. Обратитесь к следующему разделу, чтобы добавить ключ на ваш сервер. -### Android (Termux) +{{% /tab %}} + + {{% tab "Android (Termux)" %}} +### Если вы используете Android (Termux) 0. Установите [Termux](https://termux.dev/en/). Мы рекомендуем установить его из F-Droid. 1. Откройте Termux. @@ -55,7 +66,8 @@ categories: ["How-To Guides"] apt update -y && apt upgrade -y && apt install open-ssh -y && ssh-keygen -t ed25519 -f /data/data/com.termux/files/usr/etc/ssh/ssh_host_ed25519_key ``` - Вам будет предложено ввести кодовую фразу. + Вам будет предложено ввести кодовую фразу. Вы можете оставить ее пустой, но рекомендуется использовать кодовую фразу. + Если вы не хотите использовать кодовую фразу, нажмите **Enter**. 3. Выведите открытый ключ в терминал и скопируйте его: ```bash @@ -63,6 +75,11 @@ categories: ["How-To Guides"] ``` 4. Обратитесь к следующему разделу, чтобы добавить ключ на ваш сервер. + +{{% /tab %}} +{{< /tabpane >}} + + ## Как добавить ключ на ваш сервер 0. Откройте приложение SelfPrivacy.