initial working ssh entry
This commit is contained in:
		
							
								
								
									
										18
									
								
								sshtun/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								sshtun/Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
FROM debian:12-slim
 | 
			
		||||
 | 
			
		||||
RUN apt update && apt install -y openssh-server socat
 | 
			
		||||
 | 
			
		||||
RUN adduser --disabled-password --gecos "" finn
 | 
			
		||||
 | 
			
		||||
RUN mkdir /home/finn/.ssh
 | 
			
		||||
 | 
			
		||||
# only one pubkey -- wildcard to conceal filename
 | 
			
		||||
COPY ./oilykey/*.pub /home/finn/.ssh/authorized_keys
 | 
			
		||||
 | 
			
		||||
RUN mkdir /var/run/sshd
 | 
			
		||||
RUN echo "PermitRootLogin no" >> /etc/ssh/sshd_config
 | 
			
		||||
RUN echo "PasswordAuthentication no" >> /etc/ssh/sshd_config
 | 
			
		||||
 | 
			
		||||
COPY ./entrypoint.sh /
 | 
			
		||||
 | 
			
		||||
ENTRYPOINT ["/entrypoint.sh"]
 | 
			
		||||
							
								
								
									
										8
									
								
								sshtun/entrypoint.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										8
									
								
								sshtun/entrypoint.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
# Container goal:
 | 
			
		||||
# autossh -N -R 11111:localhost:11434 -i sshtun/oilykey/<SOMEKEY> -p 22222 <SOMEURL>
 | 
			
		||||
# forwards    rem_c_port:(operator_pc:op_pc_port) ...some args...  rem_host_p rem_host_url 
 | 
			
		||||
 | 
			
		||||
nohup socat TCP-LISTEN:11112,fork TCP:localhost:11111 &
 | 
			
		||||
/usr/sbin/sshd -D
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user