Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Bash Menu Script Example
- echo "Please make sure to have the tor browser running for tor-ssh and tor-sshf-mount options!"
- PS3='Please enter your choice: '
- options=("tor-ssh" "ssh" "tor-sshfs-mount" "sshfs-mount" "sshfs-unmount" "quit")
- select opt in "${options[@]}"
- do
- case $opt in
- "tor-ssh")
- echo "connecting to ssh with tor"
- ssh -t -o ProxyCommand='nc -x 127.0.0.1:9150 %h %p' buci@buci.cicum.icu
- echo ""
- echo "1) tor-ssh 3) tor-sshf-mount 5) sshf-unmount"
- echo "2) ssh 4) sshf-mount 6) quit"
- ;;
- "ssh")
- echo "connecting to ssh without tor"
- ssh -t buci.cicum.icu
- echo ""
- echo "1) tor-ssh 3) tor-sshf-mount 5) sshf-unmount"
- echo "2) ssh 4) sshf-mount 6) quit"
- ;;
- "tor-sshfs-mount")
- echo "mounting sshfs with tor"
- sshfs -o ProxyCommand='nc -x 127.0.0.1:9150 %h %p' -o nonempty buci@buci.cicum.icu:/ ~/battlestation
- echo ""
- echo "1) tor-ssh 3) tor-sshf-mount 5) sshf-unmount"
- echo "2) ssh 4) sshf-mount 6) quit"
- ;;
- "sshfs-mount")
- echo "mounting sshfs without tor"
- sshfs -o nonempty buci@buci.cicum.icu:/ ~/battlestation
- echo ""
- echo "1) tor-ssh 3) tor-sshf-mount 5) sshf-unmount"
- echo "2) ssh 4) sshf-mount 6) quit"
- ;;
- "sshfs-unmount")
- echo "!!!!you are about to unmount the sshfs mount, save your work before doing so!!!!"
- read -p "press enter to proceed!"
- echo "unmounting sshfs"
- sudo umount -l ~/battlestation
- echo ""
- echo "1) tor-ssh 3) tor-sshf-mount 5) sshf-unmount"
- echo "2) ssh 4) sshf-mount 6) quit"
- ;;
- "quit")
- echo "!!!!the script exits, and the sshfs mount will cease to exist. save your work before quitting!!!!"
- read -p "press enter to quit!"
- break
- ;;
- *) echo "invalid option $REPLY";;
- esac
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement