Skip to content

Instantly share code, notes, and snippets.

@karl-gustav
Last active October 3, 2020 20:30
Show Gist options
  • Save karl-gustav/8ddf34484eaf1fef1dfb4e4bc3240397 to your computer and use it in GitHub Desktop.
Save karl-gustav/8ddf34484eaf1fef1dfb4e4bc3240397 to your computer and use it in GitHub Desktop.
SSH tunnel that auto closes after a given time
# Portforward localhost:8080 to port 8200 on the server
ssh -L 8080:localhost:8200 usr@server.com sleep 600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment