Posted 8 months ago. Visible to the public.

Vagrant: create entry for box in .ssh/config

If you want to ssh into your vagrant box without switching into the project directory and typing vagrant ssh, you can also create an entry directly in ~/.ssh/config. This will allow you to use ssh <my-box> from anywhere. Simply paste the information provided by vagrant ssh-config to your ~/.ssh/config-File: vagrant ssh-config >> ~/.ssh/config

Example:

Copy
$ vagrant ssh-config Host foobar-dev HostName 127.0.0.1 User vagrant Port 2200 UserKnownHostsFile /dev/null StrictHostKeyChecking no PasswordAuthentication no IdentityFile /home/daniel/project/myproject/vagrant/.vagrant/machines/foobar-dev/virtualbox/private_key IdentitiesOnly yes LogLevel FATAL

Background:

Vagrant is a tool that allows you to define a Virtual Machine (Image to use, network settings, shared folders to mount…) in a configuration file (Vagrantfile). It's also possible to directly provision the VM with a CMS like Puppet to have the machine in a desired state. Upon creation Vagrant will set up a new VM and add a SSH-Key so you can ssh into the machine. Normally you would switch to the directory containing the Vagrantfile and use the command line tool vagrant ssh to log in to your machine.

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for old versions of Ruby on Rails (3.2 and 2.3).

Author of this card:

Avatar
Daniel Straßner
Last edit:
8 months ago
by Daniel Straßner
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Daniel Straßner to makandra dev