William Blankenship
Automatically Populating a known_hosts File

You are probably here because you are trying to automate a service over ssh and you need to get past this prompt:

The authenticity of host '[REDACTED]' can't be established.
ECDSA key fingerprint is [REDACTED].
Are you sure you want to continue connecting (yes/no)?


Use the following bash script.

for address in $ADDRESSES; do
  ssh-keygen -F $address 2>/dev/null 1>/dev/null
  if [ $? -eq 0 ]; then
    echo “$address is already known”
  ssh-keyscan -t rsa -T 10 $address >> ~/.ssh/known_hosts

Where $ADDRESSES is a list of hostnames or IP addresses.

The long version

So you are automating some service that needs to communicate over ssh. Why not just ignore this warning and press on with your day?

Well, for starters, you have probably found that it can be rather difficult to bypass this warning depending on the tool you are using. More importantly, this prompt is giving you the opportunity to recognize a remote server as “trusted” f


Dockerizing your Node.js Applications

Cross post from https://nodesource.com/blog/dockerizing-your-nodejs-infrastructure

This post is a deep dive into the concepts I introduced in my webinar: Need to Node Ep. 2: Dockerizing your Node.js Infrastructure from NodeSource on Vimeo.


So you have Node apps, and you want to use them with Docker. In this tutorial, we will show you how to take your Node.js application and bake it into a Docker image. This is part one of a two part tutorial on Dockerizing your Node.js Infrastructure. If you are interested in a big picture talk on what Docker is, and why Node.js and Docker are a powerhouse couple, checkout my latest webinar recording from #NeedToNode.

Without further ado, let’s get started!

Starting from a Node.js Project

I’ve put together a sample project for this tutorial. If


Docker and Node.js

Cross post from https://nodesource.com/blog/dockerizing-nodejs

The barriers between developers and operations are slowly eroding, creating a healthy environment of rapid iteration, continuous integration, and horizontal scaling. Increasingly, the tools of choice when breaking down that barrier are powered by open source software that promise openness, power and freedom to see their technology and business dreams realized. This is what brought many of us to Node.js and Docker in the first place.

But as the pace of innovation has increased, the mission of creating a “full-stack” development shop has broadened to a need for a full-stack dev/DevOps/deployment organization. Docker will increasingly become a common part of that stack.

So, what do we get out of Dockerizing Node.js?

Documenting dependencies beyond Node/npm

Part of the great appeal of Node.js is that it has a large, rich and [massive](https://medium.com/@nodesource/npm-i


Creative Commons License This work by William Blankenship is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.