Last active
July 3, 2024 17:11
-
-
Save Rainshaw/afb2629461ed3b077ffa050b47d3ef7d to your computer and use it in GitHub Desktop.
SSH Proxy Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:latest | |
RUN apk update \ | |
&& apk add \ | |
openssh-client \ | |
sshpass \ | |
ca-certificates \ | |
expect \ | |
bash | |
RUN mkdir app | |
COPY start.sh /app/start.sh | |
RUN chmod +x /app/start.sh | |
EXPOSE 12345 | |
CMD ["/app/start.sh"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect -f | |
spawn ssh -4 -D 0.0.0.0:12345 -o StrictHostKeyChecking=no $::env(ssh_user)@$::env(ssh_host) -p $::env(ssh_port) | |
expect "*ssword: " | |
send $::env(ssh_pass)\n | |
interact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment