Skip to content

Instantly share code, notes, and snippets.

@zhpengg
Created March 1, 2013 09:22
Show Gist options
  • Save zhpengg/5063465 to your computer and use it in GitHub Desktop.
Save zhpengg/5063465 to your computer and use it in GitHub Desktop.
screenssh greate tools
function screenssh ()
{
local username=work
local server=''
local timeout=3
for server in $@; do
screen -S $STY -X screen ssh $username@$server
done
#sleep $timeout
#local cmd="screen -S $STY -X at ssh# stuff $'$password\n'"
#eval $cmd
}
function lets ()
{
local cmd="screen -S $STY -X at ssh# stuff $'$1\n'"
eval $cmd
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment