I am trying to set up Vagrant for my development environment, but are having problems getting Vagrant to automatically connect to a remote server on startup
In my Vagrantfile I have the following line:
config.vm.provision "shell", path: "vagrant/startup.sh", run: "always"
In my startup.sh I have the following:
#!/usr/bin/env bash
sshpass -p '*******' ssh -fN -L 389:XXX.XXX.XXX.XXX:389 ******@********.*******.**.**
The provision runs on startup, but no ports are getting forwarded
If I SSH into the box and run the command, it just returns without any errors, but doesn't work. I can only get it to work if I don't use sshpass
P.S. Please don't tell me about the insecurity of sshpass, this is only used for LAN connections