Postmortem…My non-loading ‘/root/.ssh/config’

Summary

The issue began at 8:54 pm on Tuesday August 29th while testing question number 2: Deploy archive in the AirBnB clone — Deploy static assignment. During testing while using the fab command to depoly a web archive the following error was raised:

Fab Command: fab -f 2-do_deploy_web_static.py do_deploy:archive_path=versions/web_static_20170315003959.tgz -i my_ssh_private_key -u ubuntu

Error: Warning: Unable to load SSH config file '/root/.ssh/config'

Timeline:

8:55 pm — The fab command was generating the error above

8:56 pm — I began examining the question outlined in the Holberton assignment and began examining the code in the script to gather information.

9:04 pm— Check the the internet, google and stack overflow for possible references to similar problems.

9:06 pm — I found possible references to a similar issue on stack overflow pinpointing the error being related to the absence of the config file and to use: touch .ssh/config

9:09 pm — Began implementing the stack-overflow solution into the 2-do_deploy_web_static.py script.

9:10 pm — Run new script with stack overflow solution to create config file and find it successful.

Root Cause and Resolution:

On Monday, August 29th at 9:09 my script contained a line, “env.use_ssh_config=True.” After some research, from the Fabric documentation under Leveraging native SSH config files it says:

“Command-line SSH clients make use of a specific configuration format typically known as ssh_config, and will read from a file in the platform-specific location $HOME/.ssh/config”

This meant that I was using “env.use_ssh_config=True” and telling fabric to use the specific config file located at .ssh/config but that file did not exist. At 9:09 pm I created the config file in the .ssh directory.

At 9:10 pm, when I ran the script with the created config file in the .ssh directory the problem was fixed.

Corrective and preventative measures:

I need to be more conscious of what file fabric is using for it’s configuration file. In the future I should either remove “env.use_ssh_config=True,” and use the default configuration file. Or , ensure the .ssh/config file is created before specifying a special config file with “env.use_ssh_config=True” using Fabric.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.