cagataygurturk / docker-ssh-tunnel Goto Github PK
View Code? Open in Web Editor NEWSimple SSH tunnel with Docker
Simple SSH tunnel with Docker
The container is missing the shared volume /root/.ssh
when it runs the ssh command.
This results in an error message: Bad owner or permissions on /root/.ssh/config
Did you ever get this to work? I'm looking into a similar setup.
Following the guide used to work ok, but recently I started getting an error about ssh_auth_sock not being found.
Maybe its a recent ssh change, but it seems like ~/.ssh/ssh_auth_sock is now a symlink to a temp directory, which isn't resolved since its not mapped into the volume.
I don't know if it's the correct solution, but I was able to fix it by using the SSH_AUTH_SOCK variable to mount the temp file instead of the symlink, as follows:
image: cagataygurturk/docker-ssh-tunnel
volumes:
- $HOME/.ssh:/root/ssh:ro
- $SSH_AUTH_SOCK:/root/ssh/ssh_auth_sock
This image is super useful, but I find the massive amount of logs generated by ssh due to the -vv
parameter to be quite annoying. Would it be possible to provide an environment variable to enable debugging? Something like DEBUG=1
to enable adding the parameter, or maybe just SSH_PARAMS=-vv
to pass custom parameters to the command.
Can only one SSH Tunnel be started per container?
How should I implement mapping multiple ports in a separate container?
Thank you so much for this idea. I had exactly this problem and this works great for me.
I told the rest of the team about it, and some users had issues.
The problem was ... when they have a passcode on their id_rsa the service stalls. In the logs you can see it is stuck failing to get the passcode from tty.
Locally using ssh
to talk to the server the users don't need to enter a passcode, so it must be in the local keychain, but not visible to the docker container.
Any thoughts on how to solve this?
Cheers
Nigel
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.