-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The SSH connection was unexpectedly closed by the remote end. #610
Comments
This error suggests vagrant may have changed the requirements for configuring a hostname on a launched VM. Try removing the hostname configuration lines from the
Further testing is needed to determine what versions are impacted and if this change should be applied to the projects |
@jmartin-tech Hey! Thank you for answering,i tried removing the hostname configuration lines from the vagrant file but now when i run i uploaded a picture of the output and another picture that shows the vagrantfile in notepad++ |
@RamH101, your Based on the image posted your changes resulted in syntax that does in fact contain an mis-matched Vagrant.configure("2") do |config|
config.vm.synced_folder '.', '/vagrant', disabled: true
config.vm.define "ub1404" do |ub1404|
config.ssh.username = 'vagrant'
config.ssh.password = 'vagrant' After some testing recent on Window I suspect there are some additional changes needed to launch the VMs on a windows host. Testing with env versions of: I ran into hashicorp/vagrant#8878 for some reason and need to use the workaround offered of adding the following early in the class VagrantPlugins::ProviderVirtualBox::Action::Network
def dhcp_server_matches_config?(dhcp_server, config)
true
end
end Another known issue that can occur with the |
@RamH101, please note all these items are drift in the configuration file due to upstream changes in The |
@jmartin-tech Hey again! Thank you for all of your help so far,Now i get the following two errors in powershell(this is the output): PS C:\WINDOWS\system32\metasploitable3-workspace> vagrant up here's the vagrant file: |
when creating the local metasploitable workspace i got the following error messege:The SSH connection was unexpectedly closed by the remote end. This usually indicates that SSH within the guest machine was unable to
properly start up. Please boot the VM in GUI mode to check whether
it is booting properly.i dont think that its my vagrant version because to other people with this version the downloading process of metasploitable seemed to be smooth.i used this vagrant version because with 2.3.7 version of vagrant i got this error messege:
Shell:Cmd
Command: hostname
Message: Digest initialization failed: initialization error**
OS: Windows10 22H2
Packer Version:1.9.4
Vagrant Version:2.3.8dev tools amd64 windows
VirtualBox Version:7.0
PS C:\WINDOWS\system32> mkdir metasploitable3-workspace >> cd metasploitable3-workspace
Mode LastWriteTime Length Name
d----- 10/11/2023 9:17 PM metasploitable3-workspace
Bringing machine 'ub1404' up with 'virtualbox' provider...
Bringing machine 'win2k8' up with 'virtualbox' provider...
==> ub1404: Importing base box 'rapid7/metasploitable3-ub1404'...
==> ub1404: Matching MAC address for NAT networking...
==> ub1404: Checking if box 'rapid7/metasploitable3-ub1404' version '0.1.12-weekly' is up to date...
==> ub1404: Setting the name of the VM: Metasploitable3-ub1404
==> ub1404: Clearing any previously set network interfaces...
==> ub1404: Preparing network interfaces based on configuration...
ub1404: Adapter 1: nat
ub1404: Adapter 2: hostonly
==> ub1404: Forwarding ports...
ub1404: 22 (guest) => 2222 (host) (adapter 1)
==> ub1404: Running 'pre-boot' VM customizations...
==> ub1404: Booting VM...
==> ub1404: Waiting for machine to boot. This may take a few minutes...
ub1404: SSH address: 127.0.0.1:2222
ub1404: SSH username: vagrant
ub1404: SSH auth method: password
ub1404:
ub1404: Inserting generated public key within guest...
ub1404: Removing insecure key from the guest if it's present...
ub1404: Key inserted! Disconnecting and reconnecting using new SSH key...
==> ub1404: Machine booted and ready!
==> ub1404: Checking for guest additions in VM...
ub1404: No guest additions were detected on the base box for this VM! Guest
ub1404: additions are required for forwarded ports, shared folders, host only
ub1404: networking, and more. If SSH fails on this machine, please install
ub1404: the guest additions and repackage the box to continue.
ub1404:
ub1404: This is not an error message; everything may continue to work properly,
ub1404: in which case you may ignore this message.
==> ub1404: Setting hostname...
The SSH connection was unexpectedly closed by the remote end. This
usually indicates that SSH within the guest machine was unable to
properly start up. Please boot the VM in GUI mode to check whether
it is booting properly.
The text was updated successfully, but these errors were encountered: