News for hackers. Stuff that matters.
Re:Improving the security of your SSH private key files by stormbrew on Friday May 24, 2013 @12:40PM (#5763937)
> openssl pkcs8 -topk8 -v2 des3 \

> -in test_rsa_key.old -passin 'pass:super secret passphrase' \

> -out test_rsa_key -passout 'pass:super secret passphrase'

Is there a way to do this without including the password on the command line? Because somehow I don't think having your private key's password in your .bash_history will improve the security of your key.

[edit] Oh I see, just don't specify and it'll ask. I get that he's doing this with a sample key, but you just know someone's going to scan through this and do that command on their real key.

Re:Improving the security of your SSH private key files by rammark on Friday May 24, 2013 @01:02PM (#5764085)
If you put 'histcontrol=ignorespace' or 'histcontrol=ignoredups' in your ~/.bashrc file it will not record commands that begin with a space [1]. I believe that 'ignoreboth' is the default on many Linux distros.

[1]: http://www.linuxjournal.com/content/using-bash-history-more-...

Re:Improving the security of your SSH private key files by joosters on Friday May 24, 2013 @01:05PM (#5764103)
You still shouldn't enter these kinds of commands on a multi-user machine, because anyone running 'ps' will see the commandline arguments.
Re:Improving the security of your SSH private key files by jlgaddis on Friday May 24, 2013 @06:51PM (#5765647)
Leave out -passin and -passout.

Provide your current passphrase at the first prompt ("Enter passphrase for <infile>:") and your new passphrase at the second and third prompts ("Enter Encryption Password:" and "Verifying - Enter Encryption Password:"). You may use the same or a different passphrase on your new key.

Re:Improving the security of your SSH private key files by vacri on Friday May 24, 2013 @07:33PM (#5765788)
To avoid a command showing up in history, start the whole command with a space and the line won't be recorded to history. Or if that horse has already bolted, you can use the 'history' command to find the line number and then delete it.

Of course, most things that require passwords will request that you manually enter one if you leave the arg off.

Re:Improving the security of your SSH private key files by X-Istence on Friday May 24, 2013 @12:57PM (#5764047)
He did in the last example that shows how to do this on an actual file ...
Re:Improving the security of your SSH private key files by stormbrew on Friday May 24, 2013 @10:18PM (#5766113)
To clarify, my point is that a blog post about improving your security should not have an easily cut-and-pasteable reference for substantially decreasing your security, even if it's intended to be used on a dummy file.
Re:Improving the security of your SSH private key files by makr17 on Friday May 24, 2013 @01:26PM (#5764220)
$ export HISTFILE=/dev/null
Re:Improving the security of your SSH private key files by Nux on Friday May 24, 2013 @01:41PM (#5764281)
You want:

unset HISTFILE

Re:Improving the security of your SSH private key files by yew on Friday May 24, 2013 @02:26PM (#5764519)
Don't do that in your .bash_profile unless you run login shells on all of your terminals!

Setting HISTFILE propagates that setting to child shells - unsetting HISFILE does not.

Re:Improving the security of your SSH private key files by dsl on Friday May 24, 2013 @04:11PM (#5764956)
Undefined = Default