Initial commit
This commit is contained in:
commit
0c5ee3d3d1
12 changed files with 292 additions and 0 deletions
12
templates/local/autossh.service.j2
Normal file
12
templates/local/autossh.service.j2
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=AutoSSH tunnel service
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=autossh
|
||||
Environment="AUTOSSH_GATETIME=0"
|
||||
ExecStart=/usr/bin/autossh -M 0 gateway -N
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
12
templates/local/ssh_config.j2
Normal file
12
templates/local/ssh_config.j2
Normal file
|
@ -0,0 +1,12 @@
|
|||
Host gateway
|
||||
HostName tunnel-end.a-0.me
|
||||
User ssh-tunnel
|
||||
Port 22
|
||||
IdentityFile /home/autossh/.ssh/tunnel-key
|
||||
IdentitiesOnly yes
|
||||
ExitOnForwardFailure yes
|
||||
ServerAliveInterval 5
|
||||
ServerAliveCountMax 3
|
||||
{% for forwarding in tunneled_ports %}
|
||||
RemoteForward localhost:{{ forwarding.ephemeral_port }} {{ forwarding.dest_host }}:{{ forwarding.dest_port }}
|
||||
{% endfor %}
|
1
templates/remote/authorized_keys.j2
Normal file
1
templates/remote/authorized_keys.j2
Normal file
|
@ -0,0 +1 @@
|
|||
{{ ssh_tunnel_pubkey }}
|
9
templates/remote/sshd_config.j2
Normal file
9
templates/remote/sshd_config.j2
Normal file
|
@ -0,0 +1,9 @@
|
|||
ClientAliveInterval 30
|
||||
ClientAliveCountMax 3
|
||||
|
||||
Match User ssh-tunnel
|
||||
AllowTcpForwarding yes
|
||||
X11Forwarding no
|
||||
PermitTunnel no
|
||||
GatewayPorts clientspecified
|
||||
ForceCommand echo "Only forwarding"
|
Loading…
Add table
Add a link
Reference in a new issue