0

The server is current running bitvise SSH (I can readily switch to another solution), it is behind a firewall that blocks incoming connections (I can't open it because of reasons).

I have a computer outside of the network which is contacted periodically.

So I have a connection right?

So how can I start a SSH session utilizing the connection?

DavidPostill
  • 153,128
  • 77
  • 353
  • 394
konzo
  • 203
  • 2
  • 7
  • Please add more detail. "A connection" is too vague to be useful. – Paul Apr 06 '16 at 09:43
  • Paul i was referring to Ssh connection in the entire context.. But i used a connection implying i cant create connection of any kind from the client to server... – konzo Apr 08 '16 at 21:10

1 Answers1

1

Assuming I am interpreting your problem correctly:

  • S = server behind firewall
  • C = client outside firewall and cannot reach S on port 22 directly.

... but S can ssh to C, you could have S setup a reverse port forward by something like this:

server% ssh -fR 8822:localhost:22 client

then, later, you can connect from the client to the server by connecting to the local port on the client which is forwarding traffic to the server.

client% ssh localhost -p 8822
crimson-egret
  • 3,276
  • 17
  • 20
  • You are correct but C can't reach S at any port, unless S has started a connection... That's why i was thinking of a keep alive server K which C will keep connecting, S will notify K when it needs a ssh sesion then K will then notify C next time it connects... The C will allow an ssh season on S by connecting to it directly or through K – konzo Apr 08 '16 at 21:01