I have a script that starts my vagrant machine, opens up multiple terminals and connects to the vagrant machine via ssh in every newly opened terminal. My problem is that I need about five terminals, and I don't want to type in the password for each terminal manually. Is there a way to get prompted for the password only once in the main terminal, and use the same password for the ssh command?
#!/bin/bash cd /home/kkri/public_html/freitag/vagrant vagrant up for run in $(seq 1 $1) do gnome-terminal --window-with-profile=dark -e "ssh vagrant@localhost -p 2222" --$ done gnome-terminal --window-with-profile=git clear echo "~~~ Have fun! ~~~"