🧠
MY SECOND BRAIN
meBlogLinkedInGitHub
  • Second brain
  • AI - Artificial Intelligent
    • AI-labeling
    • AI-training
  • Books
  • Code
    • Linux
    • Gradle
  • Company
    • Interview
  • Computer science
    • Data Structures
    • Algorithms
    • Concurrency
  • Container
    • Docker
      • Docker | Private Docker Registry
    • Kubernetes
  • Distributed systems
    • Akka
    • Analytics
    • Delivery guarantee
    • Kafka
    • Rebalancing
    • RPC
      • gRPC
  • Food
    • Recipes
      • Tiramisu
  • Git
  • GH CLI
    • GH CLI | Pull Request
  • SSH
    • SSH bastion | SSH Jump host
    • SCP
  • Learning
  • Management
  • Reactive systems
  • System Design
    • CAP Theorem
    • Domain Driven Design
    • System Design Interview
    • Load Balancing
    • CDN
  • OCR
  • Productivity
    • Alfred
  • Health
    • Teeth
  • Devops
  • Data stores
    • Elasticsearch
    • Mongo
  • Germany
    • Berlin
      • Where is to buy Christmas trees in Berlin
    • Internet in Germany
      • Install custom router for telekom
  • Transport
    • Bikes
  • Travel
    • Russia
      • Moscow
        • Moscow Attractions
    • United Kingdom
  • Writing
    • Markdown
      • Markdown Tables
  • Programming languages
    • Java
      • Java | OCR
      • Java | Spring
      • JAVA | How to install multiple Java versions on macOS
    • Go
    • Kotlin
    • Python
  • Optimization
    • Email
      • Zero inbox
  • Finance
    • Investment
      • Online brokers
  • People
  • Security
    • SaaS Security
  • Unix
    • Shell
      • ZSH
  • Work
    • Feedback
Powered by GitBook
On this page
  • Description
  • Syntax to use jump host
  • Example of using Bastion host to SSH
  • SSH command options
  1. SSH

SSH bastion | SSH Jump host

Description

If you don't have access to an instance in a private network but you have a jump host (bastion) with public ip address within the same private network, then this jump host could be a bridge between you and an an instance

Syntax to use jump host

ssh -i "<ssh_pem_file>" \
  -o "ProxyCommand ssh -i "<ssh_pem_file>" -W %h:%p <jump_host_user>:<jump_host_ip>" \
  <instance_user>:<instance_host>

NOTE: Be sure, you've added <ssh_pem_file> to the jump host and private instances

Example of using Bastion host to SSH

The next command will connect to the address 10.120.10.160 via jump host 34.240.210.182

ssh -i "aws_ireland.pem" \
  -o "ProxyCommand ssh -i "aws_ireland.pem" -W %h:%p ec2-user@34.240.210.182" \
  ubuntu@10.120.10.160

SSH command options

  • -i – a path to a file (private key)

  • -v – verbose mode

  • -q – quiet mode

PreviousSSHNextSCP

Last updated 3 years ago