I
I
Igor Makhov2020-09-28 19:25:27
linux
Igor Makhov, 2020-09-28 19:25:27

Is there a reverse proxy for ssh?

I like the idea that nginx can be configured as a reverse proxy and configured to redirect to different web applications and sites (including those on different machines) depending on the domain name. Is it possible to set up something similar for ssh? You need to make sure that a connection is established at example.com with one machine, and at git.example.com with another machine (gitlab or gitea on it).

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry, 2020-09-28
@Igorgro

read what ssh jump host (or ssh bastion host) is.
Here is a good link.
https://www.redhat.com/sysadmin/ssh-proxy-bastion-... .

S
Sergey Pankov, 2020-09-28
@trapwalker

iptables

A
AVKor, 2020-09-28
@AVKor

If I understand the meaning of the question correctly, then you can configure~/.ssh/config

Host example.com
  HostName 1.1.1.1

Host git.example.com
  HostName 2.2.2.2

Other options to taste. It can be done like this:
Host example
  HostName 1.1.1.1

Host git
  HostName 2.2.2.2

In Hostare worth simply names.

K
Karpion, 2020-09-29
@Karpion

sshd basically cannot distinguish since which domain name it was accessed. Can only be by IP address or by TCP port number.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question