Skip to content

Instantly share code, notes, and snippets.

@squirrel532
Last active February 29, 2016 08:52
Show Gist options
  • Save squirrel532/bff608a19063b02086b6 to your computer and use it in GitHub Desktop.
Save squirrel532/bff608a19063b02086b6 to your computer and use it in GitHub Desktop.
#!/bin/bash
# tty_pipe=$(tty)
# echo "\$tty_pipe = $tty_pipe"
[ -z "$USER" ] && echo -ne "User: " && read USER
[ -z "$PASS" ] && echo -ne "Password: " && read -s PASS
function autoptt()
{
sleep 1
echo $USER
sleep 1
echo -ne "\r"
echo $PASS
sleep 1
echo -ne "\r"
sleep 1
echo -ne "\r"
}
autoptt | ssh bbsu@ptt.cc > /dev/null # > $tty_pipe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment