2014-12-07 26 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 .. .. | 
+-----------------+