Hide Forgot
Description of problem: Version-Release number of selected component (if applicable): openssh-5.3p1-70.el6_2.2.x86_64 How reproducible: Enable FIPS (fips=1 on kernel line), create an ssh key with a valid password, then attempt to change the password. This fails with 'Bad passphrase.' Steps to Reproduce: [root@dhcp209-46 ~]# cat /proc/sys/crypto/fips_enabled 1 [root@dhcp209-46 ~]# ssh-keygen -t rsa -f rsa -b 2048 Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in rsa. Your public key has been saved in rsa.pub. The key SHA1 fingerprint is: f6:f5:cb:d1:ce:79:a0:9f:f4:ed:18:64:79:39:ac:7e:d2:c7:61:6f root.pnq.redhat.com The key's SHA1 randomart image is: +--[ RSA 2048]----+ | | | | | | | ...| | S . ++.| | . . . +o=.| | . oBo+| | o+ %E| | oO+O| +-----------------+ root@dhcp209-46 ~]# ssh-keygen -p -f rsa Enter old passphrase: Bad passphrase. Expected results: Should be able to change an ssh key password.
This seems to be problem with used key format in OpenSSL.
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. It has been proposed for the next release. If you would like it considered as an exception in the current release, please ask your support representative.
The workaround: umask 077 openssl genrsa 2048 | openssl pkcs8 -topk8 -v2 aes128 -out rsa restorecon rsa ssh-keygen -y -f rsa > rsa.pub This creates a key in pkcs8 format even on rhel-6.
Of course changing the passphrase with ssh-keygen is not possible - the openssl pkcs8 command has to be used instead.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0443.html