trashpanda001 / docker-alpine-sshd Goto Github PK
View Code? Open in Web Editor NEWA lightweight OpenSSH Docker Image built atop Alpine Linux.
A lightweight OpenSSH Docker Image built atop Alpine Linux.
@sickp ,
I like this docker image a lot, but it seems impossible to do "ssh dynamic port forwarding" ...
What I want to do is:
However, the dynamic port forwarding doesn't seemed to be working.
09:51:02 | ~ ❯ ssh root@localhost -p 2222 -o StrictHostKeyChecking=no -CD 1080
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:RSYTCdsrMjSufFwAtqtYRooKVig/UocrbEVwCq+8N0U.
Please contact your system administrator.
Add correct host key in /Users/tt/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/tt/.ssh/known_hosts:5
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Port forwarding is disabled to avoid man-in-the-middle attacks.
Welcome to Alpine!
The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See <http://wiki.alpinelinux.org>.
You can setup the system with the command: setup-alpine
You may change this message by editing /etc/motd.
debug1: permanently_set_uid: 0/0
812c378adb41:~#
In my build script, I've added:
sed -i s/#PermitRootLogin.*/PermitRootLogin\ yes/ /etc/ssh/sshd_config
sed -i s/#GatewayPorts.*/GatewayPorts\ yes/ /etc/ssh/sshd_config
sed -i s/#AllowTcpForwarding.*/AllowTcpForwarding\ yes/ /etc/ssh/sshd_config
sed -i s/#PermitTunnel.*/PermitTunnel\ yes/ /etc/ssh/sshd_config
sed -i s/#X11Forwarding.*/X11Forwarding\ yes/ /etc/ssh/sshd_config
And from the docker instance launched from the image, we can see they are being used in sushi_config.
812c378adb41:~# grep yes /etc/ssh/sshd_config
PermitRootLogin yes
#StrictModes yes
#PubkeyAuthentication yes
# Change to yes if you don't trust ~/.ssh/known_hosts for
#IgnoreRhosts yes
#PasswordAuthentication yes
#ChallengeResponseAuthentication yes
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#GSSAPICleanupCredentials yes
# Set this to 'yes' to enable PAM authentication, account processing,
#AllowAgentForwarding yes
AllowTcpForwarding yes
GatewayPorts yes
X11Forwarding yes
#X11UseLocalhost yes
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
PermitTunnel yes
#TcpRcvBufPoll yes
However I could see port 1080 is being used on my actual machine.
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.