Home
| Calendar
| Mail Lists
| List Archives
| Desktop SIG
| Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU |
On Sat, 2005-04-02 at 13:36 -0500, Josh Pollak wrote: > I've got a silly question about ssh. I've been using the following line > to open up a port forwarding tunnel: > > ssh -L7000:hostname:80 -f -N uname at hostname > > -N tells SSH not to execute a command (so I don't get a shell), and -f > says to drop into the background as soon as its authenticated, which > allows me to type my password and not have to type ctrl-z, 'bg'. > > The question is, how do I cleanly kill this tunnel? I've been running > 'ps aux | grep ssh', finding the line and killing it, but that seems > kludgy. Is there a 'right way' to do this? Even just having ssh return > or save its pid somewhere? What I generally do instead of using -f is to just run the ssh command within screen, and then disconnect from screen. It is then out of my way, and I can use screen -r to access the process in order to kill it (or reconnect) as needed. Not sure if you'd consider that better or worse than your current solution though :)
BLU is a member of BostonUserGroups | |
We also thank MIT for the use of their facilities. |