The Vagrant ssh command is not responding.(Cannot log in)

Asked 2 years ago, Updated 2 years ago, 102 views

I have already started Vagrant in Vagrant up at the terminal.
After that, you cannot log in with the Vagrant ssh command.

Specifically

appletoma:centos7toma$vagrantssh
    appletoma —centos7toma$ 

does not switch to local@host.

I looked it up myself and found out that This link

ssh-i Key Path -p Host Side Port Guest Side Username @ Guest Side ip Address

There is a possibility that you can enter it with the command, but this

Key Path - p Host Side Port Guest Side Username @ Guest Side ip Address 

I don't know how to verify .

Which part of my PC (MAC) should I check?

Addition (tried the linked command, but it didn't change)

appletoma:centos7toma$ssh-i/Users/toma/MyVagrant/.vagrant/machine/default/virtualbox/[email protected]
kex_exchange_identification:read:Connection reset by peer
appletoma —centos7toma$ 

centos vagrant ssh

2022-09-30 19:37

2 Answers

From comments to yukihane,
Changed the IP address after bootup.Do you mean you used vagrant ssh without restarting the process?
Then vagrant ssh will not work (because the expected destination will no longer be listening to ssh).

These types of tools include vagrant and so-called provisioning tools. Items that the tool can set are left to the tool side.On the other hand, I think it is a promise not to log in to the operating system and change it.If you want to change the IP address, it's a rule to define it in a Vagrant file.

Also, regarding the link, the port number is specified in the command you are using.This will be a different value for each environment (each definition of the vagrant file), so I don't think it will work as a copy.


2022-09-30 19:37

Normally, you can output it with the vagrant ssh-config command.

For example, the output should look like this:Try associating it with the Japanese name described in the link:

Host default
  HostName 127.0.0.1< - Guest-side ip address
  User vagrant < - Guest-side username
  Port 2222< - Host side port
  UserKnownHostsFile/dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile /.../.vagrant/machines/default/virtualbox/private_key< - Key Path
  IdentityOnly yes
  LogLevel FATAL

However, (There is not much information in the questionnaire, so there is no confirmation.)appears to be different from the linked event.


2022-09-30 19:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.