The Linux Rain Linux General/Gaming News, Reviews and Tutorials

Steel, Password Managing the CLI Way

By Andrew Powell, published 10/01/2016 in Overviews

One thing that's probably obvious to anyone who's read more than a few Linux Rain articles is that we appreciate the CLI (command-line interface). Graphical programs and utilities are great and there are some fantastic examples of those out there, not to mention new ones being created all the time. But the CLI will always have a place for those who feel comfortable using it and appreciate the power and lightweight nature of the interface. So if you're looking for a password manager for the command-line, Steel is one such example we're taking a look at today.

Steel was created by Niko Rosvall. If that name sounds familiar, you may remember we covered another of Niko's projects, Memo.

According to the Steel website, the program "uses RIJNDAEL encryption in CFB mode with 256 bit keys. Steel is simple, Steel is advanced, Steel is adaptable. Steel is the new prophet of password management." I'll let you, the reader, decide whether the last part of that line is true! But nevertheless, in one line you get the idea that Steel is meant to be simple yet powerful, in true Unix fashion.

Other features include:

  • Written fully in C
  • Integrates with standard Unix tools
  • Uses SQLite as database backend
  • Generates secure passwords
  • Backup and restore

And more. The Steel homepage lists some of the more technical aspects for those interested.

Getting Steel

You'll want to head to the Download page for Steel. Fair warning: there is a quick bit of compiling to do here. That's not a problem though, as Steel, like the aforementioned Memo, is a simple C program and requires just a few dependencies. They being SQLite, Mhash and Libmcrypt. I recommend consulting the Steel download page for the latest information on this in case it changes, but if for example you wanted to install those dependencies in Ubuntu or Linux Mint, something like
sudo apt-get install libmhash-dev libmcrypt-dev libsqlite3-dev
ought to do the trick.

Then you want the Steel archive itself. It's recommended to download the stable version of Steel, which you will find on the Download page also, as well as the latest code from Gitlab if you desire it.

Extract the downloaded archive, move to the newly created source directory and run the usual basic "make" command. It should go without saying you will need to have source code "build" tools such as GCC and GNU Make installed to accomplish this.

cd ~/Downloads
tar -xvf .tar.gz
sudo make install

I recommend keeping the source directory where it is in case you wish to run sudo make uninstall at a later date to uninstall the program.


So long as you're comfortable with the command line, using Steel is pretty easy.

Database File Creation

To start using it, first you need to create (initialize) a database file, which will contain your passwords that you create in Steel.

steel -i myDB

This will create the file myDB in your current working directory. You can create as many database files as you want using the above command.

Encrypting/Closing the File

Next you'll want to apply some security to the file using Steel's close command, which will apply the encryption.

steel -c

The program will then prompt you for a passphrase. Obviously use whatever you like, but like any passwords/passphrases, try to use something secure!

Opening an Encrypted/Closed File

Then, to actually start adding passwords you'll need to tell Steel to open your database file again. This also applies to opening any "closed" database file you may have created in Steel.

steel -o myDB

Steel will prompt you for the passphrase you created for that file. Enter it correctly, Steel will now have your database file open and ready for some passwords to be added!

Adding Entries

There's two ways to create a new password entry in Steel. One simply uses the syntax of:
steel -a <user> <url> <notes></p> <p>However, there is also an interactive mode:</p> <pre><code>steel -a -I</code></pre> <p>Steel will then prompt you for the title, the username and the URL (etc) interactively, which you may find more to your liking.</p> <h3>Listing Entries</h3> <p>To list all entries in your database:</p> <pre><code>steel -l</code></pre> <p>And to list a specific entry by ID:</p> <pre><code>steel -s <id number></code></pre> <figure><img src="" alt=""></figure> <p>As you can see, simply listing an entry won't automatically display the actual password (or passphrase as it is called in Steel) for that entry, most likely for security reasons. To display the password as well, use the '-l' switch combined with the '-p' switch like so:</p> <pre><code>steel -l -p <id number></code></pre> <h3>Deleting an Entry</h3> <p>Similar to listing, only replacing the '-s' with '-d':</p> <pre><code>steel -d <id number></code></pre> <p>And so on and so forth.</p> <hr /> <p>Steel uses a sane and easily memorable syntax and there are extra commands you can play with (including using Steel to generate a password for you). I strongly recommend consulting the "man" page for Steel, where there are a full list of commands provided complete with examples.</p> <pre><code>man steel</code></pre> <p>Most importantly, once you are done adding and/or listing your saved passwords, remember to close the database file! eg. <code>steel -c</code></p> <h2>Closing thoughts</h2> <p>Steel does exactly "what it says on the tin" and does so in the style of a true Unix utility, being completely CLI oriented and making use of plain text for input/output as well as easy to use commands. Of course, thankfully, the actual sensitive data is encrypted and not stored in plain text.</p> <p>Typically, I don't make use of 'password managers', though perhaps I should given the sheer amount of times I've forgotten a password! That may well change with Steel though, as it is extremely lightweight and unobtrusive and very easy to backup and restore, not to mention being portable, given it's flat-file nature. </p> <p>That sort of thing certainly appeals to me, and if it does with you too, do give it a try!</p> <hr> <div class="share-links"> <h4>Share This</h4> <a class="googleplus" href="">Google+</a> <a class="twitter" href="" class="button">Twitter</a> <a class="facebook" href="">Facebook</a> </div> <div class="about-author"><hr /> <h4>About the author</h4> <p>Andrew Powell is the editor and owner of The Linux Rain who loves all things Linux, gaming and everything in between.</p></div> <span class="tags">Tags: <a href="/tag:steel">steel</a> <a href="/tag:password-manager">password-manager</a> <a href="/tag:cli">cli</a> <a href="/tag:command-line">command-line</a> <a href="/tag:overviews">overviews</a> </span> </div> <!-- /.article-inner-content --> <div id="disqus_container"> <div id="disqus_thread"></div> <script type="text/javascript"> var disqus_shortname = 'thelinuxrain'; // required: replace example with your forum shortname var disqus_title = 'Steel, Password Managing the CLI Way'; var disqus_developer = 'false'; // developer mode var disqus_identifier = 'articles/steel-password-managing-the-cli-way'; var disqus_url = ''; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = 'https://' + disqus_shortname + ''; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); </script> <noscript>Please enable JavaScript to view the <a href="">comments powered by Disqus.</a></noscript> <a href="" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a> </div> </article> </div> <!-- /.article-content --> <aside class="right-sidebar"> <section> <form action=""> <div class="input-group"> <input class="form-control search-field" type="text" name="q" placeholder="Search..." /> <span class="input-group-btn"> <input class="btn search-submit" type="submit" value="" /> </span> </div> </form> </section> <section> <h4>Follow Us</h4> <div class="social-follow-buttons"> <a href="" target="_blank"><span class="social-button btn-facebook"></span></a> <a href="" target="_blank"><span class="social-button btn-twitter"></span></a> <a href="" target="_blank"><span class="social-button btn-google"></span></a> <a href="feed" target="_blank"><span class="social-button btn-rss"></span></a> </div> </section> <section> <h4>Recent Articles</h4> <div class="widget_recent_entries"> <ul class="sidebar-links"> <li> <a href="">How to Bruteforce a Hash from Windows Hash File in Python</a> </li> <li> <a href="">The Complicated Firewall</a> </li> <li> <a href="">Sneaking around in Metal Gear Solid V: The Phantom Pain, thanks to Steam Proton</a> </li> <li> <a href="">Paper Dungeons Crawler Released in Early Access; First Impressions</a> </li> <li> <a href="">Liferea hack: add links to ABC (Australia) news items</a> </li> <li> <a href="">How to deal with NBSPs in a terminal</a> </li> <li> <a href="">BASH drivers, start your engines</a> </li> <li> <a href="">A handy script for translations</a> </li> <li> <a href="">When will this script finish doing its job?</a> </li> <li> <a href="">How to Run Diablo II with the GLIDE-to-OpenGL Wrapper</a> </li> </ul> </div> </section> <section> <h4>Editor Picks</h4> <div class="widget_recent_entries"> <ul class="sidebar-links"> <li> <a href="">Containers, a Great Privacy Add-On Currently in Firefox Test Pilot</a></li> <li> <a href="">Xfe file manager: an independent marvel</a></li> </ul> </div> </section> <section> <h4>Linux Links</h4> <div class="widget_recent_entries"> <ul class="sidebar-links"> <li> <a href="">Bob Mesibov's BASHing Blog</a></li> <li> <a href="">Sudo Satirical</a></li> <li> <a href="">TuxArena</a></li> </ul> </div> </section> <section> <a href="" target="_blank"><img class="img-responsive" src=""></a> </section> <section> <script async src="//"></script> <!-- SidebarAd --> <ins class="adsbygoogle" style="display:inline-block;width:300px;height:250px" data-ad-client="ca-pub-5941131116498030" data-ad-slot="4271339906"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </section> <section> <script async src="//"></script> <!-- SkyscraperAd --> <ins class="adsbygoogle" style="display:block;width:160px;height:600px;margin:0 auto;" data-ad-client="ca-pub-5941131116498030" data-ad-slot="7588929504"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </section> </aside> </div> <!-- /.main --> </div> <!-- /.container-fluid --> <div id="bottom-ad"> <script async src="//"></script> <!-- BottomAdResponsive --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5941131116498030" data-ad-slot="3688184305" data-ad-format="auto"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <footer> <div class="text-center"><p>© 2013-2017 The Linux Rain<br /> Powered by the <a href="">KirbyCMS</a><br /> Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.</p></div> </footer> <script src=""></script> <script src=""></script> <script> jQuery(document).ready(function($) { $('.dropdown-eligible').children('a').append(' <span class="caret"></span>'); $('.dropdown-eligible').children('a').addClass('dropdown'); $('.dropdown-eligible').children('a').attr('data-toggle', 'dropdown'); $('.nav .sub-menu').addClass('dropdown-menu'); }); </script> </body> </html>