Episode III – The Return of DevOps (SSH & Git)

Welcome back to a series of blogposts about how to set up a little server in a Linux Virtual Machine, in this post we will lean about Github and SSH

if you are not familiar to the topic you can go to the first or second part of the series

Ensure that you have your GitHub account.

Before you start you should have a Github account.

You can follow me @kevintroko (for some reason)

Ensure that you have a repository created for testing.

If you followed the last part we had a web server created in node, we will use this. This will be our root.

Setup your GitHub two-factor authentication.

This part is a step forward process and Github explain it 100 times better than me, but I’ll explain it anyways in case you don’t want to move to another site. It’s really nothing from the other world, is more just following a series of steps:

Go tho the git setting and click in the security tab


Click the enable two factor button

Follow the steps in the site

⚠️ ⚠️ DONT FORGET TO SAVE YOUR RECOVERY CODES ⚠️⚠️

They send you a mai anyways

You are ready

Github SSH keys Setup

This is a little bit harder than the last step, the Github team explain it as well (though some commands don’t work the same for ubuntu)

ssh-keygen -t rsa -b 4096 will create a SSH key with a 4096 encryption
ssh-keygen -t rsa -b 4096 -C “put your own email”
They will ask you for the passphrase
Enter your pass phrase from the last step
It will generate the next output
eval the ssh agent
The GitHub page recommend to get the RSA key like this, but ubuntu won’t recognize natively this command, you can just cat the file instead

Ensure that you can do a git clone (use ssh) to your server from your repository.

Clone the repo with ssh as ssh://git@github.com/<your username>/<repo name>.git
Node running

Be sure to create a token because then it will not allow you to push the new data

One thought on “Episode III – The Return of DevOps (SSH & Git)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s