Vagrant 1.9.6 hangs on command "vagrant ssh" - ssh

I have vagrant 1.9.6 and oracle virtual box 5.1.22 installed on my system. when I ran vagrant up and tried to switch into vagrant ssh on GIT bash it hangs there and nothing get it to work on me.
screenshot:

I solved mine by adding this line export VAGRANT_PREFER_SYSTEM_BIN=1 in my .bash_profile file. You can manually create this file on windows and place it on your home directory.
Take a look at this thread

Related

Ubuntu WSL2 could not resolve hostname for GIT clone

I have gitlab local repository and VPN to connect with it. I already installed WSL and it worked well before with clone repository (I've done add ssh pub). After updating kernel from WSL and change to WSL2. I cannot clone repository anymore and it returns:
ssh: Could not resolve hostname gitlab.local.id: Name or service not
known
I've done creating /etc/wsl.conf file
[network]
generateResolvConf = true
and /etc/resolv.conf file
nameserver 8.8.8.8
NOTE:
I can clone repo through GIT Bash
Restart the WSL, terminal and even reboot laptop. But still cannot clone the repository through SSH. I followed others suggestion but still no luck. Maybe your suggestion may help. many thanks!
It took me almost 3 days to try others workaround to solve it and it's just solved by re-installed the updated distro. I have no clue why origin resolv.conf (generated by WSL) before was gone after updated to WSL2 and suddenly does not resolve any hostname.
After re-install distro and re-added new SSH key to gitlab, WSL generate new resolv.conf file and git back to works again.
UPDATE:
As per request from #Philippe, The new resolve.conf:
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 172.19.144.1
This configuration comes automatically and without wsl.conf at /etc/ directory.
NOTES:
Please make sure you working on the right WSL version before you doing something on your distro or you will probably ended up with the same problem above.
Comment form #torek above was right. Git has nothing to do with the problem, but the problem causing git and other servername does not resolve. My problem begun with updating the kernel then change the wsl version in the middle of working on current distro.

WSL Stopped working with error: 0x80070003

WSL2 stopped working. When, I do a new installation of linux distro, it throws the following error on click of the launch button:
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070003
Error: 0x80070003 The system cannot find the path specified.
Press any key to continue...
the wsl --help command works fine
however wsl -l command and other wsl commands throw the following error
The system cannot find the path specified.
Check if you have any .wslconfig inside your profile in %USERPROFILE% folder and delete it! I finally got it working
FIY: https://github.com/microsoft/WSL/issues/3232#issuecomment-777023885
I was getting the same issue and it was due to my bad attempt at deleting the installed Distro. If yours is the same case, this should be pretty easy to fix, use the wsl --unregister <DISTRO_NAME> which in my case was debian so wsl --unregister debian unregistered the old path for the Debian executable and then I installed Debian again. This worked for my personal case but I thought it might help someone on the internet.

dpkg sent over SSH on Mac App not working

So I am facing a very strange peculiarity. I am trying to run dpkg on a remote server via SSH. My code works perfectly if I click Run through Xcode, but if I click Build > Archive then Export as a Mac Application, all SSH commands sent to the server work, other than "dpkg". Any ideas why this might happen?
Apparently, after many days of facing that issue, I tried installing via dpkg a Deb that was already located on my server and it worked. What's even more strange is that while scp would transfer the file, dpkg would just not use it! What made the trick was getting the file via curl and then running dpkg normally. No idea why that's the case though, as both Deb files had the same owner, group and permissions. And both were running by root, so it wasn't a permission error.

Vagrant halt doesn't work

I am trying to shut down Vagrant with vagrant halt command, but getting this error:
(blog-venv)vagrant#precise64:/vagrant$ vagrant halt The program 'vagrant' is currently not installed. You can install it by typing: sudo apt-get install vagrant
Why?
vagrant commands must be executed from the local machine. If you look at your bash prompt, you are still sshed (secure shelled) into your virtual machine. You need to exit the ssh session and then run the vagrant commands on your local machine in the local directory where your Vagrantfile configuration file is located.
You have SSHed into the vagrant machine.
first executeexit to get back to your machine and then executevagrant halt

Access Virtual Machine via PuTTY Using Built-in Command "vagrant ssh"

I have installed Vagrant, PuTTY, PuTTYgen and Virtual Box and I now want to
open a SSH connection to my virtual machine with the windows command prompt.
Every time I want to open the connection with the vagrant sshcommand I get this error:
vagrant ssh
`ssh` executable not found in any directories in the %PATH% variable. Is an
SSH client installed? Try installing Cygwin, MinGW or Git, all of which
contain an SSH client. Or use the PuTTY SSH client with the following
authentication information shown below:
I already know about the possibility to install "Git" to solve this problem!
I was wondering if its possible to use PuTTY in combination with the command vagrant ssh instead of OpenSSH!
For example:
With a batch file or something to ajust the syntaxes.
There is an official thread for Vagrant here which ended in no result AFAIR. But when googling for "vagrant putty" there seem to exist many plugins for Vagrant bringing that functionality, maybe through "hacks".
For reference: vagrant-multi-putty. Worked for me too on Windows after two simple commands: vagrant plugin install vagrant-multi-putty and vagrant putty (only for Vagrant 1.1 and newer),