質問編集履歴

2

コードがダブっていたので修正

2016/06/08 14:45

投稿

marimo.
marimo.

スコア48

test CHANGED
File without changes
test CHANGED
@@ -249,219 +249,3 @@
249
249
  ==> default: flag to force provisioning. Provisioners marked to run always will still run.
250
250
 
251
251
  ```
252
-
253
- ```Vagrantfile
254
-
255
- # -*- mode: ruby -*-
256
-
257
- # vi: set ft=ruby :
258
-
259
-
260
-
261
- # All Vagrant configuration is done below. The "2" in Vagrant.configure
262
-
263
- # configures the configuration version (we support older styles for
264
-
265
- # backwards compatibility).
266
-
267
- # you're doing.
268
-
269
- Vagrant.configure(2) do |config|
270
-
271
- # The most common configuration options are documented and commented below.
272
-
273
- # For a complete reference, please see the online documentation at
274
-
275
- # https://docs.vagrantup.com.
276
-
277
-
278
-
279
- # Every Vagrant development environment requires a box. You can search for
280
-
281
- # boxes at https://atlas.hashicorp.com/search.
282
-
283
- config.vm.box = "debian/jessie64"
284
-
285
-
286
-
287
- # Disable automatic box update checking. If you disable this, then
288
-
289
- # boxes will only be checked for updates when the user runs
290
-
291
- # `vagrant box outdated`. This is not recommended.
292
-
293
- # config.vm.box_check_update = false
294
-
295
-
296
-
297
- # Create a forwarded port mapping which allows access to a specific port
298
-
299
- # within the machine from a port on the host machine. In the example below,
300
-
301
- # accessing "localhost:8080" will access port 80 on the guest machine.
302
-
303
- # config.vm.network "forwarded_port", guest: 80, host: 8080
304
-
305
-
306
-
307
- # Create a private network, which allows host-only access to the machine
308
-
309
- # using a specific IP.
310
-
311
- config.vm.network "private_network", ip: "192.168.33.10"
312
-
313
-
314
-
315
- # Create a public network, which generally matched to bridged network.
316
-
317
- # Bridged networks make the machine appear as another physical device on
318
-
319
- # your network.
320
-
321
- # config.vm.network "public_network"
322
-
323
-
324
-
325
- # Share an additional folder to the guest VM. The first argument is
326
-
327
- # the path on the host to the actual folder. The second argument is
328
-
329
- # the path on the guest to mount the folder. And the optional third
330
-
331
- # argument is a set of non-required options.
332
-
333
- config.vm.synced_folder "./", "/home/vagrant/"
334
-
335
-
336
-
337
- # Provider-specific configuration so you can fine-tune various
338
-
339
- # backing providers for Vagrant. These expose provider-specific options.
340
-
341
- # Example for VirtualBox:
342
-
343
- #
344
-
345
- # config.vm.provider "virtualbox" do |vb|
346
-
347
- # # Display the VirtualBox GUI when booting the machine
348
-
349
- # vb.gui = true
350
-
351
- #
352
-
353
- # # Customize the amount of memory on the VM:
354
-
355
- # vb.memory = "1024"
356
-
357
- # end
358
-
359
- #
360
-
361
- # View the documentation for the provider you are using for more
362
-
363
- # information on available options.
364
-
365
-
366
-
367
- # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
368
-
369
- # such as FTP and Heroku are also available. See the documentation at
370
-
371
- # https://docs.vagrantup.com/v2/push/atlas.html for more information.
372
-
373
- # config.push.define "atlas" do |push|
374
-
375
- # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
376
-
377
- # end
378
-
379
-
380
-
381
- # Enable provisioning with a shell script. Additional provisioners such as
382
-
383
- # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
384
-
385
- # documentation for more information about their specific syntax and use.
386
-
387
- # config.vm.provision "shell", inline: <<-SHELL
388
-
389
- # sudo apt-get update
390
-
391
- # sudo apt-get install -y apache2
392
-
393
- # SHELL
394
-
395
- end
396
-
397
- ```
398
-
399
-
400
-
401
- ```shell
402
-
403
- $ vagrant --version
404
-
405
- Vagrant 1.8.1
406
-
407
- ```
408
-
409
-
410
-
411
- ```shell
412
-
413
- $ vagrant up
414
-
415
- Bringing machine 'default' up with 'virtualbox' provider...
416
-
417
- ==> default: Checking if box 'debian/jessie64' is up to date...
418
-
419
- ==> default: A newer version of the box 'debian/jessie64' is available! You currently
420
-
421
- ==> default: have version '8.4.0'. The latest is version '8.5.0'. Run
422
-
423
- ==> default: `vagrant box update` to update.
424
-
425
- ==> default: Clearing any previously set forwarded ports...
426
-
427
- ==> default: Clearing any previously set network interfaces...
428
-
429
- ==> default: Preparing network interfaces based on configuration...
430
-
431
- default: Adapter 1: nat
432
-
433
- default: Adapter 2: hostonly
434
-
435
- ==> default: Forwarding ports...
436
-
437
- default: 22 (guest) => 2222 (host) (adapter 1)
438
-
439
- ==> default: Booting VM...
440
-
441
- ==> default: Waiting for machine to boot. This may take a few minutes...
442
-
443
- default: SSH address: 127.0.0.1:2222
444
-
445
- default: SSH username: vagrant
446
-
447
- default: SSH auth method: private key
448
-
449
- ==> default: Machine booted and ready!
450
-
451
- GuestAdditions 5.0.16 running --- OK.
452
-
453
- ==> default: Checking for guest additions in VM...
454
-
455
- ==> default: Configuring and enabling network interfaces...
456
-
457
- ==> default: Rsyncing folder: /Users/hogeTaro/work/ => /vagrant
458
-
459
- ==> default: Mounting shared folders...
460
-
461
- default: /home/vagrant => /Users/hogeTaro/work
462
-
463
- ==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
464
-
465
- ==> default: flag to force provisioning. Provisioners marked to run always will still run.
466
-
467
- ```

1

コードの追加

2016/06/08 14:45

投稿

marimo.
marimo.

スコア48

test CHANGED
File without changes
test CHANGED
@@ -1,4 +1,4 @@
1
- ```vagrant up```のあとに```vagrant ssh```でゲストPCにログインできると思うのですが、その際に毎回パスワードを聞かれます
1
+ vagrant upのあとにvagrant sshでゲストPCにログインできると思うのですが、その際に毎回パスワードを聞かれます
2
2
 
3
3
 
4
4
 
@@ -28,6 +28,8 @@
28
28
 
29
29
  ```
30
30
 
31
+
32
+
31
33
  とssh-configを見る限りはIdentityFileで秘密鍵を指定しているのですが、これだけではダメなのでしょうか?例えばVagrantは~/.ssh/configも見に行っているとか、そういうことなんでしょうか?(sshに関する知識が中途半端ですいません)
32
34
 
33
35
 
@@ -35,3 +37,431 @@
35
37
  vagarnt sshでパスワードを入力ぜずにログインできる方法を教えていただけますと幸いです。
36
38
 
37
39
  よろしくお願い致します。
40
+
41
+
42
+
43
+ Vagrant 1.8.1
44
+
45
+
46
+
47
+ ```Vagrantfile
48
+
49
+ # -*- mode: ruby -*-
50
+
51
+ # vi: set ft=ruby :
52
+
53
+
54
+
55
+ # All Vagrant configuration is done below. The "2" in Vagrant.configure
56
+
57
+ # configures the configuration version (we support older styles for
58
+
59
+ # backwards compatibility).
60
+
61
+ # you're doing.
62
+
63
+ Vagrant.configure(2) do |config|
64
+
65
+ # The most common configuration options are documented and commented below.
66
+
67
+ # For a complete reference, please see the online documentation at
68
+
69
+ # https://docs.vagrantup.com.
70
+
71
+
72
+
73
+ # Every Vagrant development environment requires a box. You can search for
74
+
75
+ # boxes at https://atlas.hashicorp.com/search.
76
+
77
+ config.vm.box = "debian/jessie64"
78
+
79
+
80
+
81
+ # Disable automatic box update checking. If you disable this, then
82
+
83
+ # boxes will only be checked for updates when the user runs
84
+
85
+ # `vagrant box outdated`. This is not recommended.
86
+
87
+ # config.vm.box_check_update = false
88
+
89
+
90
+
91
+ # Create a forwarded port mapping which allows access to a specific port
92
+
93
+ # within the machine from a port on the host machine. In the example below,
94
+
95
+ # accessing "localhost:8080" will access port 80 on the guest machine.
96
+
97
+ # config.vm.network "forwarded_port", guest: 80, host: 8080
98
+
99
+
100
+
101
+ # Create a private network, which allows host-only access to the machine
102
+
103
+ # using a specific IP.
104
+
105
+ config.vm.network "private_network", ip: "192.168.33.10"
106
+
107
+
108
+
109
+ # Create a public network, which generally matched to bridged network.
110
+
111
+ # Bridged networks make the machine appear as another physical device on
112
+
113
+ # your network.
114
+
115
+ # config.vm.network "public_network"
116
+
117
+
118
+
119
+ # Share an additional folder to the guest VM. The first argument is
120
+
121
+ # the path on the host to the actual folder. The second argument is
122
+
123
+ # the path on the guest to mount the folder. And the optional third
124
+
125
+ # argument is a set of non-required options.
126
+
127
+ config.vm.synced_folder "./", "/home/vagrant/"
128
+
129
+
130
+
131
+ # Provider-specific configuration so you can fine-tune various
132
+
133
+ # backing providers for Vagrant. These expose provider-specific options.
134
+
135
+ # Example for VirtualBox:
136
+
137
+ #
138
+
139
+ # config.vm.provider "virtualbox" do |vb|
140
+
141
+ # # Display the VirtualBox GUI when booting the machine
142
+
143
+ # vb.gui = true
144
+
145
+ #
146
+
147
+ # # Customize the amount of memory on the VM:
148
+
149
+ # vb.memory = "1024"
150
+
151
+ # end
152
+
153
+ #
154
+
155
+ # View the documentation for the provider you are using for more
156
+
157
+ # information on available options.
158
+
159
+
160
+
161
+ # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
162
+
163
+ # such as FTP and Heroku are also available. See the documentation at
164
+
165
+ # https://docs.vagrantup.com/v2/push/atlas.html for more information.
166
+
167
+ # config.push.define "atlas" do |push|
168
+
169
+ # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
170
+
171
+ # end
172
+
173
+
174
+
175
+ # Enable provisioning with a shell script. Additional provisioners such as
176
+
177
+ # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
178
+
179
+ # documentation for more information about their specific syntax and use.
180
+
181
+ # config.vm.provision "shell", inline: <<-SHELL
182
+
183
+ # sudo apt-get update
184
+
185
+ # sudo apt-get install -y apache2
186
+
187
+ # SHELL
188
+
189
+ end
190
+
191
+ ```
192
+
193
+
194
+
195
+ ```shell
196
+
197
+ $ vagrant up
198
+
199
+ Bringing machine 'default' up with 'virtualbox' provider...
200
+
201
+ ==> default: Checking if box 'debian/jessie64' is up to date...
202
+
203
+ ==> default: A newer version of the box 'debian/jessie64' is available! You currently
204
+
205
+ ==> default: have version '8.4.0'. The latest is version '8.5.0'. Run
206
+
207
+ ==> default: `vagrant box update` to update.
208
+
209
+ ==> default: Clearing any previously set forwarded ports...
210
+
211
+ ==> default: Clearing any previously set network interfaces...
212
+
213
+ ==> default: Preparing network interfaces based on configuration...
214
+
215
+ default: Adapter 1: nat
216
+
217
+ default: Adapter 2: hostonly
218
+
219
+ ==> default: Forwarding ports...
220
+
221
+ default: 22 (guest) => 2222 (host) (adapter 1)
222
+
223
+ ==> default: Booting VM...
224
+
225
+ ==> default: Waiting for machine to boot. This may take a few minutes...
226
+
227
+ default: SSH address: 127.0.0.1:2222
228
+
229
+ default: SSH username: vagrant
230
+
231
+ default: SSH auth method: private key
232
+
233
+ ==> default: Machine booted and ready!
234
+
235
+ GuestAdditions 5.0.16 running --- OK.
236
+
237
+ ==> default: Checking for guest additions in VM...
238
+
239
+ ==> default: Configuring and enabling network interfaces...
240
+
241
+ ==> default: Rsyncing folder: /Users/hogeTaro/work/ => /vagrant
242
+
243
+ ==> default: Mounting shared folders...
244
+
245
+ default: /home/vagrant => /Users/hogeTaro/work
246
+
247
+ ==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
248
+
249
+ ==> default: flag to force provisioning. Provisioners marked to run always will still run.
250
+
251
+ ```
252
+
253
+ ```Vagrantfile
254
+
255
+ # -*- mode: ruby -*-
256
+
257
+ # vi: set ft=ruby :
258
+
259
+
260
+
261
+ # All Vagrant configuration is done below. The "2" in Vagrant.configure
262
+
263
+ # configures the configuration version (we support older styles for
264
+
265
+ # backwards compatibility).
266
+
267
+ # you're doing.
268
+
269
+ Vagrant.configure(2) do |config|
270
+
271
+ # The most common configuration options are documented and commented below.
272
+
273
+ # For a complete reference, please see the online documentation at
274
+
275
+ # https://docs.vagrantup.com.
276
+
277
+
278
+
279
+ # Every Vagrant development environment requires a box. You can search for
280
+
281
+ # boxes at https://atlas.hashicorp.com/search.
282
+
283
+ config.vm.box = "debian/jessie64"
284
+
285
+
286
+
287
+ # Disable automatic box update checking. If you disable this, then
288
+
289
+ # boxes will only be checked for updates when the user runs
290
+
291
+ # `vagrant box outdated`. This is not recommended.
292
+
293
+ # config.vm.box_check_update = false
294
+
295
+
296
+
297
+ # Create a forwarded port mapping which allows access to a specific port
298
+
299
+ # within the machine from a port on the host machine. In the example below,
300
+
301
+ # accessing "localhost:8080" will access port 80 on the guest machine.
302
+
303
+ # config.vm.network "forwarded_port", guest: 80, host: 8080
304
+
305
+
306
+
307
+ # Create a private network, which allows host-only access to the machine
308
+
309
+ # using a specific IP.
310
+
311
+ config.vm.network "private_network", ip: "192.168.33.10"
312
+
313
+
314
+
315
+ # Create a public network, which generally matched to bridged network.
316
+
317
+ # Bridged networks make the machine appear as another physical device on
318
+
319
+ # your network.
320
+
321
+ # config.vm.network "public_network"
322
+
323
+
324
+
325
+ # Share an additional folder to the guest VM. The first argument is
326
+
327
+ # the path on the host to the actual folder. The second argument is
328
+
329
+ # the path on the guest to mount the folder. And the optional third
330
+
331
+ # argument is a set of non-required options.
332
+
333
+ config.vm.synced_folder "./", "/home/vagrant/"
334
+
335
+
336
+
337
+ # Provider-specific configuration so you can fine-tune various
338
+
339
+ # backing providers for Vagrant. These expose provider-specific options.
340
+
341
+ # Example for VirtualBox:
342
+
343
+ #
344
+
345
+ # config.vm.provider "virtualbox" do |vb|
346
+
347
+ # # Display the VirtualBox GUI when booting the machine
348
+
349
+ # vb.gui = true
350
+
351
+ #
352
+
353
+ # # Customize the amount of memory on the VM:
354
+
355
+ # vb.memory = "1024"
356
+
357
+ # end
358
+
359
+ #
360
+
361
+ # View the documentation for the provider you are using for more
362
+
363
+ # information on available options.
364
+
365
+
366
+
367
+ # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
368
+
369
+ # such as FTP and Heroku are also available. See the documentation at
370
+
371
+ # https://docs.vagrantup.com/v2/push/atlas.html for more information.
372
+
373
+ # config.push.define "atlas" do |push|
374
+
375
+ # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
376
+
377
+ # end
378
+
379
+
380
+
381
+ # Enable provisioning with a shell script. Additional provisioners such as
382
+
383
+ # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
384
+
385
+ # documentation for more information about their specific syntax and use.
386
+
387
+ # config.vm.provision "shell", inline: <<-SHELL
388
+
389
+ # sudo apt-get update
390
+
391
+ # sudo apt-get install -y apache2
392
+
393
+ # SHELL
394
+
395
+ end
396
+
397
+ ```
398
+
399
+
400
+
401
+ ```shell
402
+
403
+ $ vagrant --version
404
+
405
+ Vagrant 1.8.1
406
+
407
+ ```
408
+
409
+
410
+
411
+ ```shell
412
+
413
+ $ vagrant up
414
+
415
+ Bringing machine 'default' up with 'virtualbox' provider...
416
+
417
+ ==> default: Checking if box 'debian/jessie64' is up to date...
418
+
419
+ ==> default: A newer version of the box 'debian/jessie64' is available! You currently
420
+
421
+ ==> default: have version '8.4.0'. The latest is version '8.5.0'. Run
422
+
423
+ ==> default: `vagrant box update` to update.
424
+
425
+ ==> default: Clearing any previously set forwarded ports...
426
+
427
+ ==> default: Clearing any previously set network interfaces...
428
+
429
+ ==> default: Preparing network interfaces based on configuration...
430
+
431
+ default: Adapter 1: nat
432
+
433
+ default: Adapter 2: hostonly
434
+
435
+ ==> default: Forwarding ports...
436
+
437
+ default: 22 (guest) => 2222 (host) (adapter 1)
438
+
439
+ ==> default: Booting VM...
440
+
441
+ ==> default: Waiting for machine to boot. This may take a few minutes...
442
+
443
+ default: SSH address: 127.0.0.1:2222
444
+
445
+ default: SSH username: vagrant
446
+
447
+ default: SSH auth method: private key
448
+
449
+ ==> default: Machine booted and ready!
450
+
451
+ GuestAdditions 5.0.16 running --- OK.
452
+
453
+ ==> default: Checking for guest additions in VM...
454
+
455
+ ==> default: Configuring and enabling network interfaces...
456
+
457
+ ==> default: Rsyncing folder: /Users/hogeTaro/work/ => /vagrant
458
+
459
+ ==> default: Mounting shared folders...
460
+
461
+ default: /home/vagrant => /Users/hogeTaro/work
462
+
463
+ ==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
464
+
465
+ ==> default: flag to force provisioning. Provisioners marked to run always will still run.
466
+
467
+ ```