I need to connect via SSH to a remote host when a virtual machine starts, run there some commands and close the connection. I'm trying to do it using the following bootstrap.sh script:
*#!/usr/bin/env bash* > *sudo su* > *apt-get install sshpass* > *sshpass -p 'password' ssh -o StrictHostKeyChecking=no > [email protected]* > *#some commands go here* > *exit* > The system responds: > > > > *==> default: Pseudo-terminal will not be allocated because stdin is not a > terminal.The SSH command responded with a non-zero exit status. > Vagrantassumes that this means the command failed. The output for this > commandshould be in the log above. Please read the output to determine > whatwent wrong.* > The command "sshpass -p 'password' ssh -o StrictHostKeyChecking=no [email protected]" works well when i type it after manual "vagrant ssh". What am I doing wrong? I would be grateful for any advice! -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/vagrant/issues IRC: #vagrant on Freenode --- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/91fdc505-50e9-4b29-af21-d429c19b634d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
