Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloud bastion #2

Merged
merged 4 commits into from
Oct 16, 2018
Merged

Cloud bastion #2

merged 4 commits into from
Oct 16, 2018

Conversation

Kirill-Garbar
Copy link
Collaborator

@Kirill-Garbar Kirill-Garbar commented Oct 16, 2018

Выполнено ДЗ №

  • Основное ДЗ
  • Задание со *

В процессе сделано:

  • Созданы две ВМ. Одна с внутренним. Одна с внешним и внутренним IP - пограничный сервер.
  • Проработаны несколько вариантов подключения через proxy по SSH
  • Проработан метод создания алиасов для SSH.
  • Проработана подключение по SSH keys.
  • Развёрнут по инструкции OpenVPN с надстройкой pritunl. Настроено использование с let's encrypt и сервисом sslip.io.

Подключение к someinternalhost в одну команду. Три способа.

  • ssh -o ProxyCommand="ssh -i ~/.ssh/appuser appuser@35.187.10.59 nc %h %p" appuser@10.156.0.2
  • ssh -o ProxyCommand="ssh -W %h:%p -i ~/.ssh/appuser appuser@35.187.10.59" appuser@10.156.0.2
  • ssh -tt -i ~/.ssh/appuser -A appuser@35.187.10.59 ssh -tt 10.156.0.2

Вариант решения для подключения командой ssh someinternalhost.

Добавить Host в файл config в директории .ssh.

Host someinternalhost
        HostName 10.156.0.2
        User appuser
        IdentitiesOnly yes
        IdentityFile ~/.ssh/appuser
        ProxyCommand ssh -i ~/.ssh/appuser appuser@35.187.10.59 nc %h %p

Данные для подключения

bastion_IP = 35.187.10.59
someinternalhost_IP = 10.156.0.2

Как проверить работоспособность:

PR checklist

  • Выставил label с номером домашнего задания
  • Выставил label с темой домашнего задания

Copy link

@hostberg hostberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Работа принята. 👍 Не забывай проставлять нужные label'ы (не было cloud-bastion).

@Kirill-Garbar Kirill-Garbar merged commit 0e326bb into master Oct 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants