Skip to content

Commit

Permalink
Add demux
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiSG committed Nov 17, 2014
1 parent 0442938 commit f5d1073
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions functions/demux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# Kills multiplexed processes.
# Multiplexed SSH connections can stall.
# Credit: https://github.com/jmhobbs/helper-scripts/blob/master/ssh-kill-mux

function demux() {
ps aux | grep ssh | grep '\[mux\]' | grep -v grep | awk '{print $2}' | xargs -t kill
}

0 comments on commit f5d1073

Please sign in to comment.