Running remote commands after vagrant ssh
This works for me: vagrant ssh — -t ‘cd /var/www; /bin/bash’
This works for me: vagrant ssh — -t ‘cd /var/www; /bin/bash’
I always used the “proper” solution, but I used expect in other situations. Here I found following suggestion: #!/usr/local/bin/expect spawn sftp -b cmdFile user@yourserver.com expect “password:” send “shhh!\n”; interact
You are looking for ssh-copy-id. All this command does is create .ssh and .ssh/authorized_keys and set their permissions appropriately if they don’t exist. Then it appends your public key to the end of .ssh/authorized_keys.
If the permissions are correct, SELinux might still be preventing sshd from opening the file. Try fixing the labels inside the .ssh directory (and maybe $HOME): restorecon -FRvv ~/.ssh If the user account uses non-standard home path, default labels for the path need to be added to the local configuration first: semanage fcontext -a -t … Read more
Vagrant changed the behaviour between 1.6 and 1.7 versions and now will insert auto generated insecure key instead of the default one. You can cancel this behaviour by setting config.ssh.insert_key = false in your Vagrantfile. Vagrant shouldn’t replace insecure key if you specify private_key_path like you did, however the internal logic checks if the private_key_path … Read more
In ansible There is no option to store passphrase-protected private key For that we need to add the passphrase-protected private key in the ssh-agent Start the ssh-agent in the background. # eval “$(ssh-agent -s)” Add SSH private key to the ssh-agent # ssh-add ~/.ssh/id_rsa Now try running ansible-playbook and ssh to the hosts.
If you’re using Gitlab on gitlab.com then the domain is simply gitlab.com so you should run ssh -T git@gitlab.com
You can try with Xvfb. it does not require additional hardware. Install Xvfb if you didn’t install it yet and do the following steps. sudo apt-get install -y xvfb Dependencies to make “headless” chrome/selenium work: sudo apt-get -y install xorg xvfb gtk2-engines-pixbuf sudo apt-get -y install dbus-x11 xfonts-base xfonts-100dpi xfonts-75dpi xfonts-cyrillic xfonts-scalable Optional but nifty: … Read more