2014-12-07 50 views
0

我无法在OpenShift.com上创建SSH密钥对。我收到以下错误消息无法在OpenShift上创建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

Stack Overflow是编程和开发问题的网站。这个问题似乎是无关紧要的,因为它不是关于编程或开发。请参阅帮助中心的[我可以询问哪些主题](http://stackoverflow.com/help/on-topic)。也许[超级用户](http://superuser.com/)或[Unix&Linux堆栈交换](http://unix.stackexchange.com/)会是一个更好的地方。 – jww 2017-06-25 03:22:28

回答

1

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

ssh-keygen -t rsa -C "[email protected]" 
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 [email protected] 
The key's randomart image is: 
+--[ RSA 2048]----+ 
|   ..  | 
|   o.  | 
|  . o+. | 
|  + .+o | 
|  . S o o | 
| E .o.o . + | 
| . ++ .. + | 
| . o.. .o | 
|  o .. .. | 
+-----------------+