#問題
ほんの数分前までは、vagrant sshで接続できていたのに、突然接続できなくなった。
原因が全く分からなく、解決法も分からないので、ご教授願いたいです。
#試してみたこと
・iTerm再起動
・wifi再接続
・sudo cat /var/log/secure でディレクトリを見ようと思ったが、ディレクトリが存在しなかった
~/vagrant/sample ❯ vagrant ssh ssh_exchange_identification: read: Connection reset by peer ~/vagrant/sample ❯ sudo cat /var/log/secure Password: cat: /var/log/secure: No such file or directory ~/vagrant/sample ❯ ssh -v vagrant OpenSSH_7.7p1, LibreSSL 2.7.3 debug1: Reading configuration data /Users/wataruarata/.ssh/config debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 48: Applying options for * debug1: Connecting to vagrant port 22. ssh: Could not resolve hostname vagrant: nodename nor servname provided, or not known
#追加情報
/Users/wataruarata/.ssh/config の中身
❯ cat /Users/wataruarata/.ssh/config 1 Host 192.168.33.10 2 HostName 127.0.0.1 3 User vagrant 4 Port 2222 5 UserKnownHostsFile /dev/null 6 StrictHostKeyChecking no 7 PasswordAuthentication no 8 IdentityFile /Users/wataruarata/vagrant/centos/.vagrant/machines/default/virtualbox/private_key 9 IdentitiesOnly yes 10 LogLevel FATAL 11
vagrant global-status
ssh -vvv vagrant@192.168.33.10
~/vagrant/sample ❯ vagrant global-status id name provider state directory ------------------------------------------------------------------------- 34eb7b1 default virtualbox poweroff /Users/wataruarata/vagrant/centos bfb68ba default virtualbox poweroff /Users/wataruarata/vagrant/Genevs 029b021 default virtualbox running /Users/wataruarata/vagrant/sample 911fab2 default virtualbox poweroff /Users/wataruarata/vagrant/Docker The above shows information about all known Vagrant environments on this machine. This data is cached and may not be completely up-to-date (use "vagrant global-status --prune" to prune invalid entries). To interact with any of the machines, you can go to that directory and run Vagrant, or you can use the ID directly with Vagrant commands from any directory. For example: "vagrant destroy 1a2b3c4d" ~/vagrant/sample ❯ ssh -vvv vagrant@192.168.33.10 OpenSSH_7.7p1, LibreSSL 2.7.3 debug1: Reading configuration data /Users/wataruarata/.ssh/config debug1: /Users/wataruarata/.ssh/config line 1: Applying options for 192.168.33.10 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 48: Applying options for * debug2: resolve_canonicalize: hostname 127.0.0.1 is address debug2: ssh_connect_direct: needpriv 0 debug1: Connecting to 127.0.0.1 [127.0.0.1] port 2222. debug1: Connection established. debug1: key_load_public: No such file or directory debug1: identity file /Users/wataruarata/vagrant/centos/.vagrant/machines/default/virtualbox/private_key type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/wataruarata/vagrant/centos/.vagrant/machines/default/virtualbox/private_key-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_7.7 ssh_exchange_identification: read: Connection reset by peer
回答2件
あなたの回答
tips
プレビュー