-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Carlos E. R. wrote:
> Or reverse ssh. I can not describe, I have not used it. Or a tunnel to
> some server out there.
Reverse-ssh is pretty nice, but would require a couple bucks a month to
say Linode (or Digital Ocean or any of the other VPS providers out
there).
It's been a little while since I've done this, so I might have an error
or two. Note that this requires sshd to be installed on the machine
behind CGNAT (I think it is, but...)
Hosts:
- PC-H --> the PC behind the CGNAT ISP
- VPS --> the intermediary VPS system
- Laptop --> the device we're carrying around / connecting from outside
with.
User accounts:
- dan@pc-h
- revssh@vps
- you@laptop
1. Setup the tunnel.
- As dan@pc-h, connect to the VPS with the command :
ssh -R 40022:localhost:22 revssh@vps
- This will open a connection to "revssh@vps". Leave it open, but
walk away from "PC-H" now.
- The port "40022" is arbitrary, it can be anything you like, that is
above 1024.
- The port "22" is the port that sshd is listening to on PC-H
2. Grab the laptop, and login to the VPS as normal (i.e. "ssh
revssh@vps".)
- Note: any valid account on the VPS will work for this step.
3. Test the tunnel from the VPS.
- Connect to the tunnel with "ssh -oPort=40022 dan@localhost"
- Authenticate with the proper ssh credentials (private key and/or
password, as appropriate) for the account "dan@pc-h"
4. You should now be sitting at your normal "dan@pc-h" prompt. Use PC-H
as normal, or jump to other hosts on your LAN, as necessary.
HTH :)
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEE3asj+xn6fYUcweBnbWVw5UznKGAFAmGLxZYACgkQbWVw5Uzn
KGCV6hAAkax/PjOZol2Gat6KyjN4g+esTsR3n1oND4fHMHC59vSz8oH4/GCtWEim
x5gS1pUzSBSYdT/KoIqw/krIDr/01tjcA6QWToP/nnwFVIjupKsRP5eTEnGdFacr
ksQiLi+JHRRFMWIYYzgNNGIQc4GEgeR6XTXBJHmNIlooKw86tyP7SS/14ZL+P2su
7RagkMvGE6S5ukgiCrjUKJq/O+8WV3Kln3LK9EjhggcPUQCCFCDP+teFWTMbv8tL
miNO2+jpH8wibOotazoKqb3gwtb4ojUniG2KvNgw09Q2/00OeUURbMHpZrDqmhsO
mtUMZV2Fx4p3xm2/PBGI4eVBfV8w1FEcUqJ4zwc2PyD6X6sWk8xUfTV3PmN4w5Rs
3fC91kz0X9G0tTvG3KLOZtiHAQOHbd3aYLeujiY/zSKPeNPhdoEUc11ahnqtOje5
mXfLAetF1TUYTj91X9DTajXC11bDWuKt0avZ3nA2GlAT6laSlvtqJhpXd/2JOkOJ
yE4XVehRSLxP/hK7+rrBImmiNX6lE/K/XCunOf5UuaabctyVwWSmvUVilLus3duN
LykYLg81KF9j8YDOKsPsmDL5j3CAzCFj1bk6+XUL/OYv8pYUYb8tdAh7SzaNiypZ
YrJeZw1OOq6EARLkDU6SJUMKjY2ce0F7bgZKaKcrxt1btSg8HNE=
=Tl56
-----END PGP SIGNATURE-----
--
|_|O|_| Github:
https://github.com/dpurgert
|_|_|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860
|O|O|O| Former PGP: 05CA 9A50 3F2E 1335 4DC5 4AEE 8E11 DDF3 1279 A281