ssh: check if a tunnel is alive
Netcat is your friend: nc -z localhost 6000 || echo “no tunnel open”
Netcat is your friend: nc -z localhost 6000 || echo “no tunnel open”
Solved it! The thing was to connect to the correct server when creating the tunnel itself – should’ve seen that one coming. ssh -f user@ssh.example.com -L 3307:mysql1.example.com:3306 -N Then mysql -h 127.0.0.1 -P 3307 worked as intended. 🙂
1) Assuming you connect from home to foo, you need a reverse tunnel (-R) ssh -R 8080:localhost:3000 foo.mycompany.com This will enable processes running at foo to connect to localhost:8080 and actually speak to your home computer at port 3000. If you want other computers at your work to be able to connect to foo:8080 and … Read more
Using your hosts network as network for your containers via –net=host or in docker-compose via network_mode: host is one option but this has the unwanted side effect that (a) you now expose the container ports in your host system and (b) that you cannot connect to those containers anymore that are not mapped to your … Read more
The Java Secure Channel (JSCH) is a very popular library, used by maven, ant and eclipse. It is open source with a BSD style license.