Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Review Suggested Edit

You can't approve or reject suggested edits because you haven't yet earned the Edit Posts ability.

Approved.
This suggested edit was approved and applied to the post 7 months ago by Quasímodo‭.

79 / 255
  • @Canina's answer contains a good solution if you only want to reach a small number of hosts.
  • But requiring a port (local though, not on the jumphost, so many users don't compete for resources) for each host you want to reach doesn't scale to many hosts. It also requires you set the tunnel up before you need it, that's not good if you don't know which hosts you'll need to connect to.
  • In an earlier setup at the company I work for, we had a bunch of hosts (and it constantly grew) I could only reach through a jumphost, to reach them I had a line like the following in my `.ssh/config` for a wildcard entry matching the hosts I couldn't reach directly:
  • ProxyCommand ssh <myuser>@<jumphost> nc -w1 %h %p
  • This made ssh (I am - and also was back then - on a linux machine, using the openssh implementation) connect to the jumphost and on that run `nc` which then proxied everything to the host I really wanted to connect to. I don't remember, but this probably required me to run an SSH-agent with forwarding enabled.
  • [Canina's answer][canina] contains a good solution if you only want to reach a small number of hosts.
  • But requiring a port[^localport] for each host you want to reach doesn't scale to many hosts. It also requires you set the tunnel up before you need it. That's not good if you don't know which hosts you'll need to connect to.
  • In an earlier setup at the company I work for, we had a bunch of hosts I could only reach through a jumphost, and the list constantly grew. To reach them, I had a line like the following in my `.ssh/config` for a wildcard entry matching the hosts I couldn't reach directly:
  • ProxyCommand ssh <myuser>@<jumphost> nc -w1 %h %p
  • This made SSH[^openssh] connect to the jumphost and run `nc` on it, which then proxied everything to the host I really wanted to connect to. I don't remember, but this probably required me to run an SSH-agent with forwarding enabled.
  • [^localport]: A local port, not one on the jumphost, so many users don't compete for resources.
  • [^openssh]: I am&mdash;and also was back then&mdash;on a Linux machine, using the OpenSSH implementation.
  • [canina]: https://linux.codidact.com/posts/282493/282494#answer-282494

Suggested 8 months ago by Michael‭