teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

6

追加情報

2020/04/29 09:08

投稿

Tomato_leaf
Tomato_leaf

スコア178

title CHANGED
File without changes
body CHANGED
@@ -155,4 +155,19 @@
155
155
  debug1: Local version string SSH-2.0-OpenSSH_8.1
156
156
  kex_exchange_identification: read: Connection reset by peer
157
157
  appletoma:centos7 toma$
158
+ ```
159
+
160
+ 追記4(ssh -v -i /Users/toma/MyVagrant/.vagrant/machines/default/virtualbox/private_key -p 2222 コマンドの結果)
161
+ ```ここに言語を入力
162
+ appletoma:centos7 toma$ ssh -v -i /Users/toma/MyVagrant/.vagrant/machines/default/virtualbox/private_key -p 2222 vagrant@127.0.0.1
163
+ OpenSSH_8.1p1, LibreSSL 2.7.3
164
+ debug1: Reading configuration data /etc/ssh/ssh_config
165
+ debug1: /etc/ssh/ssh_config line 47: Applying options for *
166
+ debug1: Connecting to 127.0.0.1 [127.0.0.1] port 2222.
167
+ debug1: Connection established.
168
+ debug1: identity file /Users/toma/MyVagrant/.vagrant/machines/default/virtualbox/private_key type -1
169
+ debug1: identity file /Users/toma/MyVagrant/.vagrant/machines/default/virtualbox/private_key-cert type -1
170
+ debug1: Local version string SSH-2.0-OpenSSH_8.1
171
+ kex_exchange_identification: read: Connection reset by peer
172
+ appletoma:centos7 toma$
158
173
  ```

5

追加情報

2020/04/29 09:08

投稿

Tomato_leaf
Tomato_leaf

スコア178

title CHANGED
File without changes
body CHANGED
@@ -131,4 +131,28 @@
131
131
  [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
132
132
  [-Q query_option] [-R address] [-S ctl_path] [-W host:port]
133
133
  [-w local_tun[:remote_tun]] destination [command]
134
+ ```
135
+
136
+ 追記3(ssh -v -p 2222 vagrant@127.0.0.1コマンドでログを確認)
137
+
138
+ ```ここに言語を入力
139
+ appletoma:centos7 toma$ ssh -v -p 2222 vagrant@127.0.0.1
140
+ OpenSSH_8.1p1, LibreSSL 2.7.3
141
+ debug1: Reading configuration data /etc/ssh/ssh_config
142
+ debug1: /etc/ssh/ssh_config line 47: Applying options for *
143
+ debug1: Connecting to 127.0.0.1 [127.0.0.1] port 2222.
144
+ debug1: Connection established.
145
+ debug1: identity file /Users/akinoritoma/.ssh/id_rsa type -1
146
+ debug1: identity file /Users/akinoritoma/.ssh/id_rsa-cert type -1
147
+ debug1: identity file /Users/akinoritoma/.ssh/id_dsa type -1
148
+ debug1: identity file /Users/akinoritoma/.ssh/id_dsa-cert type -1
149
+ debug1: identity file /Users/akinoritoma/.ssh/id_ecdsa type -1
150
+ debug1: identity file /Users/akinoritoma/.ssh/id_ecdsa-cert type -1
151
+ debug1: identity file /Users/akinoritoma/.ssh/id_ed25519 type -1
152
+ debug1: identity file /Users/akinoritoma/.ssh/id_ed25519-cert type -1
153
+ debug1: identity file /Users/akinoritoma/.ssh/id_xmss type -1
154
+ debug1: identity file /Users/akinoritoma/.ssh/id_xmss-cert type -1
155
+ debug1: Local version string SSH-2.0-OpenSSH_8.1
156
+ kex_exchange_identification: read: Connection reset by peer
157
+ appletoma:centos7 toma$
134
158
  ```

4

追加情報

2020/04/29 07:53

投稿

Tomato_leaf
Tomato_leaf

スコア178

title CHANGED
File without changes
body CHANGED
@@ -47,6 +47,7 @@
47
47
  ```
48
48
 
49
49
  追記2(VagrantFile中身)
50
+ ```vagrantfile
50
51
  # -*- mode: ruby -*-
51
52
  # vi: set ft=ruby :
52
53
 
@@ -117,8 +118,9 @@
117
118
  # apt-get install -y apache2
118
119
  # SHELL
119
120
  end
121
+ ```
120
122
 
121
- に対する返信
123
+ 「ssh-vのオプションをつけてログを見ることができるのでお試しください」に対する返信
122
124
 
123
125
  ```ここに言語を入力
124
126
  appletoma:centos7 toma$ ssh -v

3

追加情報

2020/04/29 06:28

投稿

Tomato_leaf
Tomato_leaf

スコア178

title CHANGED
File without changes
body CHANGED
@@ -44,4 +44,89 @@
44
44
  appletoma:centos7 toma$ ssh -p 2222 vagrant@127.0.0.1
45
45
  kex_exchange_identification: read: Connection reset by peer
46
46
  appletoma:centos7 toma$
47
+ ```
48
+
49
+ 追記2(VagrantFile中身)
50
+ # -*- mode: ruby -*-
51
+ # vi: set ft=ruby :
52
+
53
+ # All Vagrant configuration is done below. The "2" in Vagrant.configure
54
+ # configures the configuration version (we support older styles for
55
+ # backwards compatibility). Please don't change it unless you know what
56
+ # you're doing.
57
+ Vagrant.configure("2") do |config|
58
+ # The most common configuration options are documented and commented below.
59
+ # For a complete reference, please see the online documentation at
60
+ # https://docs.vagrantup.com.
61
+
62
+ # Every Vagrant development environment requires a box. You can search for
63
+ # boxes at https://vagrantcloud.com/search.
64
+ config.vm.box = "centos/7"
65
+
66
+ # Disable automatic box update checking. If you disable this, then
67
+ # boxes will only be checked for updates when the user runs
68
+ # `vagrant box outdated`. This is not recommended.
69
+ # config.vm.box_check_update = false
70
+
71
+ # Create a forwarded port mapping which allows access to a specific port
72
+ # within the machine from a port on the host machine. In the example below,
73
+ # accessing "localhost:8080" will access port 80 on the guest machine.
74
+ # NOTE: This will enable public access to the opened port
75
+ # config.vm.network "forwarded_port", guest: 80, host: 8080
76
+
77
+ # Create a forwarded port mapping which allows access to a specific port
78
+ # within the machine from a port on the host machine and only allow access
79
+ # via 127.0.0.1 to disable public access
80
+ # config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
81
+
82
+ # Create a private network, which allows host-only access to the machine
83
+ # using a specific IP.
84
+ # config.vm.network "private_network", ip: "192.168.33.10"
85
+
86
+ # Create a public network, which generally matched to bridged network.
87
+ # Bridged networks make the machine appear as another physical device on
88
+ # your network.
89
+ # config.vm.network "public_network"
90
+
91
+ # Share an additional folder to the guest VM. The first argument is
92
+ # the path on the host to the actual folder. The second argument is
93
+ # the path on the guest to mount the folder. And the optional third
94
+ # argument is a set of non-required options.
95
+ # config.vm.synced_folder "../data", "/vagrant_data"
96
+
97
+ # Provider-specific configuration so you can fine-tune various
98
+ # backing providers for Vagrant. These expose provider-specific options.
99
+ # Example for VirtualBox:
100
+ #
101
+ # config.vm.provider "virtualbox" do |vb|
102
+ # # Display the VirtualBox GUI when booting the machine
103
+ # vb.gui = true
104
+ #
105
+ # # Customize the amount of memory on the VM:
106
+ # vb.memory = "1024"
107
+ # end
108
+ #
109
+ # View the documentation for the provider you are using for more
110
+ # information on available options.
111
+
112
+ # Enable provisioning with a shell script. Additional provisioners such as
113
+ # Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
114
+ # documentation for more information about their specific syntax and use.
115
+ # config.vm.provision "shell", inline: <<-SHELL
116
+ # apt-get update
117
+ # apt-get install -y apache2
118
+ # SHELL
119
+ end
120
+
121
+ に対する返信
122
+
123
+ ```ここに言語を入力
124
+ appletoma:centos7 toma$ ssh -v
125
+ usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
126
+ [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]
127
+ [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
128
+ [-i identity_file] [-J [user@]host[:port]] [-L address]
129
+ [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
130
+ [-Q query_option] [-R address] [-S ctl_path] [-W host:port]
131
+ [-w local_tun[:remote_tun]] destination [command]
47
132
  ```

2

追加情報

2020/04/29 06:26

投稿

Tomato_leaf
Tomato_leaf

スコア178

title CHANGED
File without changes
body CHANGED
@@ -25,4 +25,23 @@
25
25
 
26
26
  の確認方法がわかりません。
27
27
 
28
- これは自分のPC(MAC)のどこを確認すればよろしいでしょうか?
28
+ これは自分のPC(MAC)のどこを確認すればよろしいでしょうか?
29
+
30
+ 追記
31
+
32
+ 下記のようにVMは動いているようです。
33
+
34
+ ```ここに言語を入力
35
+ appletoma:centos7 toma$ vagrant status
36
+ Current machine states:
37
+
38
+ default running (virtualbox)
39
+
40
+ The VM is running. To stop this VM, you can run `vagrant halt` to
41
+ shut it down forcefully, or you can run `vagrant suspend` to simply
42
+ suspend the virtual machine. In either case, to restart it again,
43
+ simply run `vagrant up`.
44
+ appletoma:centos7 toma$ ssh -p 2222 vagrant@127.0.0.1
45
+ kex_exchange_identification: read: Connection reset by peer
46
+ appletoma:centos7 toma$
47
+ ```

1

追加情報

2020/04/29 05:42

投稿

Tomato_leaf
Tomato_leaf

スコア178

title CHANGED
File without changes
body CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  となっておりlocal@hostに切り替わりません。
12
12
 
13
- 自分で調べた所、ここのリンクにありますように
13
+ 自分で調べた所、[ここのリンク](https://qiita.com/k-shimoji/items/abff44020bb3b2d065fe)にありますように
14
14
  ```ここに言語を入力
15
15
  ssh -i 鍵のパス -p ホスト側のポート ゲスト側のユーザー名@ゲスト側のipアドレス
16
16
  ```