SSH Tunneling, Running processes in background, and getting more internet

(Friday, August 07, 2009, at 09:50 AM)

Running a program in terminal that you want to run forever? Is it on your server? Well, this command is a great starting point:

ssh -f user@target “cd /some/directory; program-to-execute”

also, to ssh tunnel a site, you’ll want this

ssh -f -L 8080:hidden.domain.com:80 user@visible.domain.com -N

In my case, this takes the form of:

ssh -f -L 8080:capacam.bennington.edu:80 code@cs0.bennington.edu -N

also, if you authorize your machine for the connection, you can run the first command up there with an & following the command, and you’ll never hear from it again.

Back