Skip to content

Instantly share code, notes, and snippets.

@boscomonkey
Created October 4, 2010 18:33
Show Gist options
  • Save boscomonkey/610204 to your computer and use it in GitHub Desktop.
Save boscomonkey/610204 to your computer and use it in GitHub Desktop.
#!/bin/bash
# forward my local port (e.g., 3000) to REMOTE_HOST's port
# and run top to keep tunnel from closing
ssh -t -g -R :$REMOTE_PORT:0.0.0.0:$LOCAL_PORT $REMOTE_HOST "top d 15"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment