Should look like this:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMlUr7PCEdBmCVZHG5RqI8i7GgYAzd2G/FZ987XXa63vnqxZmZogVmmXrTnBHeM6oDv7v7g495CiiiINhJbGR4o7t4agiHOM43egDv7BbiViTlfVr3y5AxLUvRwHnC3egl8ABVX1anfXXR73x7IS3YRNWkh6gXtlhImw8UKG04UoZEmWB9BLt53lk/9c3Hxz22YZarzImrpQYy1XEUZ096B9mK/Fe+/McH78ZHUpXEgOZBIDP5KdqPk5XKznpwUDJ4/SPXPEWWCCjQ8gOoTFcFMaiMnXp5o5Udsi/DFO1TS/t8BeCRymkr5tdPvzexjkjkjkjkjkjkjkjkjkjkjkjt Ubuntu@azure-server

Here’s what it looks like for me:

Cool and you’ll also notice that there’s another file in that same directory – server-key$ ls | grep server
Here’s what that looks like for me:

Now that we have our public and private keys let’s get our VM setup.

B. Create a VM in Azure that uses the public key

1. Go to the Azure Portal

2. Select New -> Search: Ubuntu Server
(I’m using 14.04 this time)

3. Make sure you’ve selected Resource Manger and click Create:

4. Now configure the basics per our ssh-keygen parameters
Name: azure-server
VM Disk Type: Up To You
User name: Ubuntu
Authentication type: SSH public key
SSH public key: Paste the results of $ cat server-key.pub
Subscription: Depends how you want to pay for the server
Resource Group: Up to you – I’m going to create a new one so I can quickly delete it.
Location: Up to you

Should look like this:

Then select OK to go to the next section.

5. Choose Virtual Machine Size
I’m going with the smallest VM for testing.
You can also view all different VM sizes to find the right one for your use case.

6. Configure optional Features
Setting the Storage account name to something you’ll remember easily is good.
And if you want to configure ports now you can select Network Security group to allow ports specific traffic.
Here’s what that looks like:
Click okay to continue to the Summary of your VM.

Here’s our summary:

Select okay to start your VM.

7. Wait for it to be ready.
Dashboard will have an icon and you’ll get a notification when its ready:

8. Once ready select on it to see the overview and the IP address.
Should look like this:

Great! We have a VM and its IP address. Lets use our Private SSH key to connect.

C. Connect to VM using SSH Keys

1. Open bash to file location you created the keys in.
Make sure they’re there:$ ls | grep server

2. Enter this command to use SSH to connect:$ ssh -i server-key Ubuntu@52.183.31.11 -v
or more generally$ ssh -i keyname username@ip.address -v
Make sure you’re using server-key and not server-key.pub
Tip: -v is the verbose option. Not necessary, but it helps to see if the key is being accepted

3. Great, now accept the certificate, and enter your memeroablePassphrase
Whole thing should look like this:

Let’s say you’re at your first hackathon. You have an idea you want to develop quickly and manage and deploy remotely so you’re ready to scale, or aggregate data cross platform. Buzzwords.

I’ve seen it many times in my last 3 months of attending hackathons.

Students want to get started quickly without wasting time worrying about deployment and compatibility across devices this setup will also prepare them to work in a team because it’ll allow deployment from Git. And these principles carry down into innovation initiatives happening at companies around the world one solution is MEAN.

Let’s say you’re new to web development and you’re learning node but don’t want to gunk up you machine with installations and moving files around before you have a grasp of what really matters.

That’s where MEAN in the Cloud comes in.

So what we’re going to do is install the MEAN stack on a cloud server so we can mess with code, learn, restart, and more without worrying about ruining our machine.

14. take note of those values it should be something like: ‘youservername.cloudapp.net: 22″
This is your server host name and the SSH port we’ll be using this in the next section to access your remote machine

We now have a Linux VM with the Ubuntu distribution. This is our base on which we’ll build the MEAN stack.Second: Get into Server

For this part we’ll need an SSH client. Putty is what I’ve always used and works well for this instance. Download page

1. in the box labeled Host Name (or IP address) paste ‘yourservername.cloudapp.net’ and leave the port at 22.

4. Install the MongoDB packages – This will download the latest stable version, but you can be specific if you liked an older version. Read more into it here.~$ sudo apt-get install -y mongodb-org
You’ll get about 30 seconds of output.

5. Reload local package database~$ sudo apt-get update

Alright! Mongo is installed, here’s a great tutorial if you want to get a better understanding of how Mongo works.Fourth: Install Node

Node is the web app framework that you’ll be building you application with. Although its not spelled MNEA or NMEA, this more accurately represents the priority of these tools.

1. Install Node:~$ sudo apt-get install nodejs

2. Confirm install with ‘Y’
About 20 seconds of output.

3. Node is now installed you run node by entering nodejs this will take you to the Node REPL.

4. Try it out~$ nodejs

5. In the REPL you can run javascript> console.log('hello world');

6. ctrl+c twice will exit the repl.Fifth: Create your first Node app

We now have everything we technically need to start development with Node, the first thing we’ll do is create a hello world app to begin putting the pieces together.

1. First install emacs24 an inline text editor for linux that will allow us to make changes to code inside our terminal. sudo apt-get install emacs24
a ‘Y’ will be required to finish
And we’ll get about a minute of output.
Now we can edit code right here! No need to worry about messing up your own file system.

2. Make sure we’re updated.~$ sudo apt-get update

3. make a directory to hold our demo~$ mkdir mean-practice

4. ‘ls’ will show us our newly created directory

5. Change into that directory~$ cd mean-practice

6. now we’ll create our first file inside of that directory. /mean-practice$ emacs package.json
This will open a new emacs view that will allow us to make changes, save ctrl+x+s and close ctrl+x+c.

This is the minimum. As you learn more about node you’ll see what else will go in there.
ctrl+x+s to save and ctrl+x+c to exit.

8. Let’s create our main file, basically our entry point for the application, and where the server will begin operating./mean-practice$ emacs server.js

9. put this into that file:console.log("Hello World with NODE!");
Though possibly over-zealous this is our first node app!
ctrl+x+s to save and ctrl+x+c to close.

10. Type ‘ls’ to see what’s in our mean-practice directory.
Not a ton, but everything we need to start our application.

11. Let’s run our application:/mean-practice$ nodejs server
Sweet! All we’ll get as output is “Hello World with NODE!” but that’s better than a kick to the face.

12. To stop the server press ctrl+cSixth: Install secret N, NPM

Node strengths and rapid growth are due in large par to the awesome npm. A package manager which will allow you to import a whole host of clever tools, apps, widgets, and formatting helpers to make your node development as easy as possible. So let’s install that now.

1. Install express/mean-practice$ sudo npm install express --save
express is in the npm system and –save will edit our package.json file to include the express module. Click this link to find out more about express.
Expect about 15 seconds of output.

2. Enter ls to see our new directory ‘node_modules’ where our node modules are being stored.

3. Open package.json to see the changes in our manifest./mean-practice$ emacs package.json
You’ll now see under dependencies “express”
Yay! Now express is installed.
ctrl+x+s to save and ctrl+x+c to exit.

4. Now lets install angular./mean-practice$ sudo npm install angular
Now the angular module is part of our application! Click on the link above to learn more about Angular.

That’s it! Now you have a MEAN stack ready for development!

Let’s quickly build a simple server, configure an endpoint in azure and become a client with our browser.Eigth: Get a tiny server running

12. Change the private port to ‘3000’
We’re mapping our endpoints improperly for this demo to keep things simple. As you learn more about web development you’ll want to change your endpoints to accurately reflect what’s happening in your server.

13. Hit the checkmark.

14. Back in your putty shell run the server! /mean-practice$ nodejs server.js

15. Open a new tab in your browser and navigate to: ‘yourservername.cloudapp.net’

16. CHECK IT OUT! You’ve got a website running node on a virtual machine! Throw your hands in the air! You’re ready to hack and learn.