Step 2: Use git with an ssh URL to connect through the tunnel to your behind-the-VPN git repo: If "telnet" is not found, then install it with apt-get install telnet or yum install telnet or whatever for your distro. If you get an answer like SSH-2.0-OpenSSH_5.1p1 Debian-5 you are in business. But now we'll test to see whether it's working or not: The relevant permission is PermitTunnel and it must be allowed (or omitted) in /etc/ssh/sshd_config (debian). Note that we have to have permission to do this on the server the default is for it to be on, but it might not be. (You can use any convenient port 3333 is just an example.) ssh -元333::22 ssh's you into, but in the process sets up a TCP tunnel between your localhost port 3333 through the proxy internet host and to port 22 on. We'll call it, and we'll assume that access to git is via ssh on port 22, which is very common for git repos with commit access. The host that has the git repository on it.The internet or VPN host that has access to your git repository.The local machine where we want to be able to do a git clone or git pull or whatever.We have 3 machines we're interacting with here: What does that mean? It means that you can access machines and ports from your local machine that you never thought you could, including git repositories that are behind firewalls or inside VPNs. It's a treasured geek secret that ssh can tunnel TCP connections like ssh all over the internet.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |