### Start a VPN Tunnel Source: https://context7.com/gregorlarson/ssh2vpn/llms.txt Initiate a one-time VPN connection to a target host. ```bash # Start a tunnel to a host by name ssh2vpn start webserver # Start a tunnel to a host by number ssh2vpn start 2 ``` -------------------------------- ### Start a Persistent VPN Tunnel Source: https://context7.com/gregorlarson/ssh2vpn/llms.txt Initiate a VPN tunnel that automatically reconnects upon failure. ```bash # Start a persistent tunnel that auto-reconnects on failure ssh2vpn persist database-server # Start a persistent tunnel by host number ssh2vpn persist 3 ``` -------------------------------- ### Configure SSH Server for Tunneling Source: https://context7.com/gregorlarson/ssh2vpn/llms.txt Enable tunnel devices in the SSH daemon configuration to allow VPN functionality. ```bash # Edit /etc/ssh/sshd_config and add/modify: PermitTunnel yes # Restart sshd to apply changes sudo systemctl restart sshd ``` -------------------------------- ### Manage SSH Agent for ssh2vpn Source: https://context7.com/gregorlarson/ssh2vpn/llms.txt Initialize a dedicated ssh-agent and load keys for secure, persistent tunnel authentication. ```bash # Initialize the ssh2vpn dedicated agent ssh2vpn agent # Load private keys into the ssh2vpn agent (prompts for passphrase) ssh2vpn add # Now start a persistent tunnel using the loaded keys ssh2vpn persist production-server ``` -------------------------------- ### Check VPN Connection Status Source: https://context7.com/gregorlarson/ssh2vpn/llms.txt Display the state of active or failed VPN tunnels by host name or index. ```bash # Show status of all connections ssh2vpn status # Show status for a specific host by name ssh2vpn status webserver # Show status for a specific host by number ssh2vpn status 1 ``` -------------------------------- ### Generate Restricted SSH Certificates Source: https://context7.com/gregorlarson/ssh2vpn/llms.txt Create SSH certificates limited to ssh2vpn access and specific subnets. ```bash # Generate certificates for ssh2vpn access ssh2vpn mkcert ``` -------------------------------- ### Stop a VPN Tunnel Source: https://context7.com/gregorlarson/ssh2vpn/llms.txt Terminate an active locally managed SSH TUN session. ```bash # Stop a tunnel to a specific host ssh2vpn stop webserver # Stop a tunnel by host number ssh2vpn stop 1 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.