How Do You Use TLS with Nginx?

Problem scenario
You know how to use TLS with Node.js because of this article.  You want to use TLS with Nginx to test it out with a regular web browsing session.  You want to implement TLS without Node.js.  How do you set up TLS (without paying a certificate authority and without Node.js)?

Solution
This assumes that port 443 is not blocked from the workstation to the Nginx server.

How Do You Set up Passwordless SSH from One Server to Another?

Problem scenario
You want to configure passwordless SSH between two servers such that you can log in from server A to server B with no password.  You want to be able to use scp between the two servers without being challenged for a password.  How do you set up passwordless SSH between them?

Solution

Assumptions
Assuming both servers have a local user account named “ubuntu”,

What is SNI?

Question
What is SNI?

Answer
SNI stands for server name indication (OpenSSL.org).  It is an extension of TLS (Transport Layer Security).  TLS is a mechanism for secure network communication (Microsoft).

When using openssl, and thus TLS, the SNI name can be a DNS name or an IP address (OpenSSL.org).  TLS needed the SNI extension capability for a client server to send the hostname in the first (a “client hello” message) of three parts of the TLS handhsake process (OpenSSL.org). 

What Are Some Differences in the Two Code Versioning Systems Known as Git and Subversion?

Code versioning systems keep track of different versions of various programs and relevant flat files that the programs may use (e.g., initialization, configuration, parameter consumption, files etc.). Some people refer to them as SCMs (Source Control Managers) or VCSes (Version Control Systems).

Code from versioning systems can be read from a centralized repository and be written to a local drive.  This is considered a pull. 

Is Python a Strongly-Typed Language?

Question
Some programming languages adhere to a discipline known as being “strongly typed.”  This attribute governs variable assignments.  Is Python a strongly-typed language?

Answer
Technically, yes it is.  Some interviewers for jobs involving Python may ask this question and expect you to say “no it is not.”

Detailed Explanation
In software development there are many people who have used Python and found its variables to be “dynamically typed” and not “statically typed.” 

How Do You Troubleshoot “curl: (52) Empty reply from server”?

Problem scenario
You are running a curl command.  But you get this error “curl: (52) Empty reply from server.”  What is the problem?

Possible solution #1
You are using curl with a port assignment in the URL (e.g., http://coolname.com:5077).  Try a different port.

Possible solution #2  (This solution is only relevant if the URL endpoint is supported by a Docker container.)
The docker-compose.yml file could be configured incorrectly.  It may refer to files with incorrect paths.  You may need to change the docker-compose.yml file to refer to correct paths.  An alternative solution would be to create the necessary files that the docker-compose.yml file needs and the related subdirectories that the file is looking for.  Your “docker-compose up” command may work with no errors.  But the references to the URL path may produce the “Empty reply from server” if the docker-compose.yml file refers to directory paths (e.g., for nginx listening on a specific port) in subdirectories that do not exist.

[Sassy_Social_Share]

How Do You Troubleshoot the Puppet Error “[/var/lib/puppet/facts.d]: Failed to generate additional resources using ‘eval_generate’: SSL_connect returned=1”?

Problem scenario
You run puppet agent -t -d and get this error:

“Error: /File[/var/lib/puppet/facts.d]: Failed to generate additional resources using ‘eval_generate’: SSL_connect returned=1”

What do you do?

Solution
This is more of a resolution rather than a diagnosis.  The error should go away if you follow these steps.

On the Puppet agent node run these commands:

sudo cd /var/lib/puppet/ssl
sudo rm -rf *
sudo puppet agent -t -d

If you cannot find the ssl directory in the above location,

How Do You Install Java Version 8 on a Windows 64 Bit Server with PowerShell?

Problem scenario
You need to install Java version 8 on a Windows 64 bit server.  How do you do this with PowerShell?

Solution
1.  Open PowerShell ISE as Administrator.

2.  Run this script:

#  This is a modified version of PowerShell code taken from this site:
#  https://skarlso.github.io/2015/06/30/powershell-can-also-be-nice-or-installing-java-silently-and-waiting/

$JDK_VER=”1u151″
$JDK_FULL_VER=”8u151-b12″
$JDK_PATH=”1.8.0_151″
$source86 = “http://download.oracle.com/otn-pub/java/jdk/$JDK_FULL_VER/jdk-$JDK_VER-windows-i586.exe”
$source64 = “http://javadl.oracle.com/webapps/download/AutoDL?BundleId=230542_2f38c3b165be4555a1fa6e98c45e0808”
$destination86 = “C:\Program Files (x86)\$JDK_VER-x86.exe”
$destination64 = “C:\Program Files (x86)\$JDK_VER-x64.exe”
$client = new-object System.Net.WebClient
$cookie = “oraclelicense=accept-securebackup-cookie”
$client.Headers.Add([System.Net.HttpRequestHeader]::Cookie,

How Do You Monitor a Server Being up with AWS or How Do You Use AWS Route 53 without a Domain Name?

Problem scenarios
One, or both, of the following apply to your situation:

Problem scenario #1
How do you use AWS (the SNS component) to set up an email alert to be notified of a server going down?

Problem scenario #2
You want to use Amazon Route 53 to see how this component works.  You do not want to register a domain name.