0

Want to set up a proxy to access a system in a private subnet.

  • We have a system A in our Office network.
  • System B and System C are in cloud. System B has a public IP.
  • Need to access System C in Cloud.

I am trying to use autossh to accomplish this. This is what i have done:

  • Password less SSH access from System A to System B is setup.
  • Passwordless SSH Access from System B to System C is setup.
  • Running autossh as a systemd service on System B:
ExecStart=/usr/bin/autossh -M 0 -4 -N sshuser@System A -g \
  -R 0.0.0.0:1234:System C:1234 \
  -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -o BatchMode=yes -o StrictHostKeyChecking=no -i /root/.ssh/id_rsa

After this when i access System C:1234 i don't get the resource. Any help is appreciated.

4
  • My suggestion: try to run just ssh on its own first. Once it does what you want, you can move on to autossh. If you've already done that and would like to have us take a look at the problem, please Include the (redacted if needed) output from the commands that do not work as expected. Commented Jun 25, 2020 at 1:26
  • Can you please help me with the command ? I am trying to setup a ssh reverse tunnel from System B (In my above example). Commented Jun 25, 2020 at 6:59
  • Search for ssh jump host. For example this could help. If you run into problems, come back and please try to follow the advice on my previous comment, on how to report them. Commented Jun 25, 2020 at 13:21
  • Thank you. I was unable to connect via SSH as the port was already taken. Resolving that fixed the issue for me. :) Thanks again. Commented Jun 29, 2020 at 20:29

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.