• Servers and Tools

Setup with Vagrant

From the class:  SSH

We're going to be using a software program called Vagrant, just like we have in the other server classes. And Vagrant allows us to manage and run a virtual machine on our local machine, on our laptop. And you might be wondering, well, if we're using a virtual machine, will these concepts apply for machines on Amazon or DigitalOcean or some of the other providers you might be using? And the answer is, yes, absolutely.

And the reason is because we're going to be studying SSH and OpenSSH. Those are software programs. And whether we run that on a virtual machine or some remote machine on Amazon, it's going to be the same concepts. We're going to have to do things a little bit differently with Vagrant, but I'll explain those differences upfront. So if you're not familiar with Vagrant, or you want to recap on it, go ahead over to Evented Mind and search for VirtualBox or for Vagrant, and you'll find the 9 minute video that gives you a tour of how to use this software.

If you've git-cloned the repository for this class, you can just clone the repository, change into the directory, and type vagrant up. And that will bring up the virtual machine for the first time. And then we can SSH into the machine by typing vagrant ssh. Now we're going to use SSH directly in a little bit, but just to get us started here, use vagrant ssh, and that will automatically do everything for us and land us right into the Ubuntu shell. If you need to exit out of the shell, just type exit. That will drop us back into our laptop.

And if you want to start this from scratch-- in other words, you don't have this Vagrant file in the source project folder-- you can type vagrant init, and the box that we're going to be using for this class is ubuntuvivid64. So that will create a Vagrant file in your project, and then you can vagrant up just like we did before. So you don't actually need to clone the git up repository to work through this class.

So let's start off with SSHing into the Vagrant machine, and this will drop us into the Ubuntu instance in a shell.