To summarize, you have on host A (proxy.net) with a public IP and host B without a public IP. You want to to enter into an ssh shell on B from A.
This can be done by forwarding a free port of A to the sshd listening port on B.
To achieve this, first if it is not already running start sshd either by entering
sshd
into a shell, or if you have systemd like
systemctl start sshd
After this, set up a reverse tunnel from B to A like this:
ssh -N -R 8890:localhost:22 <a_user>@proxy.net
The port 8890 can be exchanged with any free port on A. The port 22 is the port that the ssh deamon sshd is listening to on B.
Most likely it is 22, but it could be a different port.
You can find out by running
sudo netstat -lntp
There should be a line with sshd in the Progam Name column.
In that line the local address columns should show something like 127.0.0.1:22
. The number behind the :
is the port your ssh deamon is listening on.
After setting up the remote ssh tunnel, you can ssh into B from A by running
ssh -p 8890 <b_user>@localhost
In this post I have used <a_user>
for the user on A and <b_user>
as tokens for the user on B.