Skip to content

Instantly share code, notes, and snippets.

@jfalco
Created December 16, 2012 16:01
Show Gist options
  • Save jfalco/4308866 to your computer and use it in GitHub Desktop.
Save jfalco/4308866 to your computer and use it in GitHub Desktop.
irc-connect
#!/bin/bash
# If we get an argument, use it for ssh port, otherwise use default of 22
if [ -n "$1" ]
then
port=$1
else
port=22
fi
host="<server IP or FQDN>"
# Call weechat's local rnotify
rnotify.tcl 4321 &
# ssh and attach
autossh -M 20000 $host -p $port -R 4321:localhost:4321 -t 'tmux attach -d'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment