无法在OpenShift上创建SSH密钥对

时间:2014-12-07 12:00:28

标签: ssh openshift

我无法在OpenShift.com上创建SSH密钥对。我收到以下错误消息

Generating public/private rsa key pair.
Enter file in which to save the key (/var/lib/openshift/$USER/.ssh/id_rsa): mytestkeys
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
open mytestkeys failed: Permission denied.
Saving the key failed: mytestkeys.

1 个答案:

答案 0 :(得分:1)

默认情况下,您无权更改~/.ssh目录中的任何内容。但是,您可以通过转到~/app-root/data并在那里生成密钥来创建密钥对。例如:

ssh-keygen -t rsa -C "test@redhat.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/var/lib/openshift/540e021350044613d80000be/.ssh/id_rsa): ./id_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in ./id_rsa.
Your public key has been saved in ./id_rsa.pub.
The key fingerprint is:
8c:d5:eb:3f:5c:86:07:d8:40:7e:aa:cc:6e:70:6a:42 test@redhat.com
The key's randomart image is:
+--[ RSA 2048]----+
|         ..      |
|         o.      |
|        . o+.    |
|       +  .+o    |
|      . S o  o   |
|    E .o.o  . +  |
|   .   ++ .. +   |
|    . o..  .o    |
|     o ..   ..   |
+-----------------+