SSH reverse tunel over public host

@Office

cat <<EOF> ~/bin/proxy-ssh-forward.sh
#!/bin/bash
 
eval \$(ssh-agent) && ssh-add
 
while true; do
    echo "Connect to proxy ..."
    ssh -a -v -N -R 7422:localhost:22 -o ServerAliveInterval=30 -o ServerAliveCountMax=10 proxy.example.com
    sleep 10
done
EOF
 
chmod +x ~/bin/proxy-ssh-forward.sh
nohup ~/bin/proxy-ssh-forward.sh

@Home

cat <<EOF>> ~/.ssh/config.d/office
Host proxy.example.com
Hostname 1.2.3.4
User foo
 
Host proxy-ssh-office
Hostname 127.0.0.1
Port 7422
User bar
#ForwardAgent yes
ProxyCommand ssh proxy.example.com -W %h:%p
EOF
 
ssh proxy-ssh-office