How Do You Create an RSA Private/Public Key Pair with OpenSSH in Windows?

Problem scenario
You have OpenSSH installed on a Windows machine.  You are in a PowerShell prompt as Administrator in the directory where the ssh-keygen.exe file is.  You run this:  .\ssh-keygen.exe -t rsa
You get “Generating public/private rsa key pair.”  No new prompt appears.  It hangs (or stalls) for a long time.  You wait, and find that it is essentially frozen.  You control-c to interrupt it and move on.

You are in a PowerShell prompt as Administrator in the directory where the ssh-keygen.exe file is. 

Two Error Messages when Installing Gems On Linux

Problem scenario:  You are trying to use gem install, but you get an error like this:
“usr/bin/ruby extconf.rb
mkmf.rb can’t find header files for ruby at /usr/lib/ruby/ruby.h”

Solution:  Install ruby-devel.  For RedHat deriviatives, you can find the rpm here.

=====================================================================================

Problem scenario:  You are running gem install *.gem, and you get ‘ERROR: While executing gem …

Using a rubyntlm script (http.rb), you get “connection refused.”

Problem scenario:  You modify this script to have a hostname, username, and password of a Windows server with IIS installed.  You add a “puts line” stanza on line 32 for debugging.  You try to run the script with ruby http.rb, but you get “connection refused.”  

Possible solutions:  If you changed the port stanza in the http.rb file from 80, make sure there is no firewall blocking the port in the path to the Windows server. 

Rubyntlm: Communication from a Linux Server to a Windows Server

Problem scenario:  You modify this script to have a hostname, username, and password of a Windows server on your network.  You add a “puts line” stanza on line 32.

You run the script but you get a message like this: “HTTP/1.1 404 Not Found error. “

Solution:  Make sure that the Windows server has IIS installed, make sure the server name you entered was correct,

This Command “gem install contint.gem” Hangs Forever

Problem scenario:  You are running gem install *.gem and it hangs.  This stalling appears to be a freeze.  You wait several minutes and nothing happens.  You are waiting for a message or a new prompt.

Solution:  Control-C to get out of it.  Try it again with the “-V” flag like this:

gem install contInt.gem -V

# This time be patient. 

Unexpected PowerShell Closures and Controlling the Flow of PowerShell Scripts

Problem scenario:  You PowerShell or PowerCLI window keeps exiting automatically when you run a script.  You find that RAM and CPU are not constrained.  
Root cause: Human error.
Solution:  Look for the “exit” or the “Exit-Pssession” commands.  These can close PowerShell’s ISE or PowerCLI.  You may need to eliminate these commands or use a different keyword.

———————————————————————————————————————————————————————–
Problem scenario: 

How do you install Jenkins on a RedHat Linux server without an Internet connection?

Problem Scenario 
(If you have an internet connection, see this posting.)  In trying to install the different .rpms (e.g., on CentOS/RHEL/Fedora) for Jenkins you get errors.

For example, here is one command you might try:
yum localinstall springframework-aop-3.2.15-3.fc24.noarch.rpm

This above command may result in an error like this:
“Requires: mvn(org.springframework:spring-beans) = 3.2.15.RELEASE … Requires: mvn(org.springframework:spring-core) = 3.2.15.RELEASE”

Here is another command you might try: 

How Do You Install Pywinrm Without Pip and Without a Yum Repo?

Problem Scenario:  You have CentOS (or a RedHat derivative) and Python is installed.  You want to install pywinrm.  When using Python and Python packages you get this error “gaierror … ‘Temporary failure in name resolution’)).”  How do you install pywinrm without pip and without a relevant yum repo?

Root cause:  It can be caused by excessive open connections.  A reboot could fix the problem.

Perl Script Debugging

Problem scenario:  You are running a Perl program and getting an error “syntax error at cool.pl line x, near …
Global symbol “$foo” requires explicit package name at cool.pl line x…”

Solution:  Find line x – 1, that is, the line before x.  This line may not have a semicolon.  Semicolons are not needed if the Perl script is one line.  Semicolons are not needed for “sub main” declaration lines with a line with just a brace (either “{” or “}”). 

How to Create .EXE Files With PowerShell

Problem Scenario 
You want to package a standalone .ps1 script as an .exe file.  How do you create an executable file that does what a PowerShell script does?

Solution 
Install PowerShell Community Extensions.  Then download this .ps1 file and use it according to the conventions in the comments, near the top, of the script itself,

The usage instructions are in the code.