is it possible to connect to an SSH server only accessible from inside a network, using a Windows machine without SSH as a gateway?.
Let me clarify my question with a sketch:
Me (Linux machine)---> WIN (Windows without SSHD)--->LIN (Linux with SSHD).
Machine Me, is the PC I'm using to connect to LIN through WIN. WIN is accessible from the outside, it has an RDESKTOP port open, and LIN is only accessible from inside the network.
Hope you understand the question.
No, sshd does the forwarding so without a SSH daemon running in Windows you cannot.
OpenSSH has a very flexible ability to use proxy via the ProxyCommand option. If the Windows box doesn't have an SSH daemon on it, then can you install a socks proxy, an HTTP CONNECT proxy, or a generic TCP proxy? If so, then you can use it as a point to connect to the internal system. The exact details would depend on exactly what kind of proxy you install, and what kind of firewalls/filters are between the various systems.
There is no way you are going to do this without installing at least some kind of proxy on the Windows box. Windows doesn't have any built-in generic proxy that would allow it to forward SSH traffic.
The core question is if you can connect to some service through another machine. The answer is yes, but you need software.
I just did a quick google and found this thing: http://www.quantumg.net/portforward.php The same exists on Linux in various utilities, but my personal favorite is rinetd http://www.boutell.com/rinetd/.
Both work the same way - you run a program that basically forwards packets from one host to another. If you have access to the machine in the middle, you should be able to install a daemon / server that will do this.
Windows has the builtin port mapping mechanism:
netsh interface ipv6 install # Port forwarding needs to enable ipv6 netsh interface portproxy add v4tov4 listenaddress=188.8.131.52 listenport=22 connectaddress=192.168.1.2 connectport=22
Replace 184.108.40.206 with your Windows Server's public IP, and replace 192.168.1.2 with your Linux Server's intranet IP