My home computer is behind an ISP-level NAT (and firewall).
The target computer is work computer behind gateway. You have to log to gateway computer first via SSH (as it is the only one visible and with access from Internet). The SSH daemon on this gateway is configured to allow only 'keyboard-interactive' logins (i.e. no password-less public-key logging). Then you log to target computer using public-key based logging (only).
How to set up SSH tunnels (I would probably need two of them: forward and reverse), so that after setting those up I can login from my home computer directly to host computer, and vice-versa, both without providing password.
I'd like to be able to, for example, synchronize my private git repositories (pushing from home to target, and fetching from target to home).
Note that this is more involved setup that the one described in question How can I forward traffic from my publicly available server to a computer that is not publicly available?
ssh -R localhost:8022:localhost:22 gateway1
, which would allow connections on gateway1:8022 to be proxied back to your home PC port 22 (SSH) -- CAUTION: anyone who has access to gateway1 can now SSH to your system! – Kyle Smith Jun 03 '11 at 20:27