如何更改openshift的ssh密钥位置



我正在设置rhc客户端工具以连接到OpenShift。在"rhc设置"过程中,应该生成ssh密钥:

~/.ssh/

但是,这个。ssh文件夹正在用于另一个连接,我的首选是不修改这个文件夹。

是否可以在rhc安装过程中以某种方式指定ssh密钥生成的不同位置?

因为在rhc设置过程中,我没有被问到在哪里生成密钥,我也查看了~/.openshift/express.conf,我只看到了ssl的配置;没有ssh。

谢谢。

不确定它在windows上是如何工作的。您是否尝试在运行rhc时设置HOME env变量?或者在windows上有任何HOME*变量来指定用户的home dir (HOMEPATH, HOMEDRIVE…)。

我只能假设谁否决了这是一个白痴。刚刚在linux上尝试了一下,它正在工作。我无法在windows上进行测试,但它很有可能也能在windows上运行。无论如何,对于那些觉得有用的人:

$ HOME=/home/crackit/newhome rhc setup
OpenShift Client Tools (RHC) Setup Wizard
This wizard will help you upload your SSH keys, set your application namespace,
and check that other programs like Git are properly installed.
If you have your own OpenShift server, you can specify it now. Just hit enter to
use the server for OpenShift Online: openshift.redhat.com.
Enter the server hostname: |openshift.redhat.com| 
You can add more servers later using 'rhc server'.
Login to openshift.redhat.com: xxxxx@yyyyyy.zzz
Password: *************
OpenShift can create and store a token on disk which allows to you to access the
server without using your password. The key is stored in your home directory and
should be kept secret.  You can delete the key at any time by running 'rhc
logout'.
Generate a token now? (yes|no) yes
Generating an authorization token for this client ... lasts about 1 month
Saving configuration to /home/crackit/newhome/.openshift/express.conf ... done
No SSH keys were found. We will generate a pair of keys for you.
    Created: /home/crackit/newhome/.ssh/id_rsa.pub
Your public SSH key must be uploaded to the OpenShift server to access code.
Upload now? (yes|no)
yes
  default (type: ssh-rsa)
  -----------------------
    Fingerprint: ba:49:1e:2a:22:1d:e4:69:3b:ee:62:09:dc:2d:4c:f1
  dpospisi (type: ssh-rsa)
  ------------------------
    Fingerprint: 83:89:a7:c4:bd:31:31:8c:26:a4:82:a5:8e:6e:c0:65
You can enter a name for your key, or leave it blank to use the default name.
Using the same name as an existing key will overwrite the old key.
Provide a name for this key: |asdfghhjjkk| gah
Uploading key 'gah' ... done
Checking for git ... found git version 2.1.0
Checking common problems .. done
Checking for a domain ... asdfghh
Checking for applications ... found 2
  jenkins http://aaaa-bbbbbb.rhcloud.com/
  tmp     http://tmp-bbbbbb.rhcloud.com/
  You are using 2 of 3 total gears
  The following gear sizes are available to you: small, medium
Your client tools are now configured.

如果您的.ssh文件夹中已经有现有的ssh密钥,rhc setup命令可能会询问您是否要上传现有的密钥,而不是创建新的密钥。如果你登录到openshift web控制台,你可以看到它是否为你上传了一个密钥。

相关内容

  • 没有找到相关文章

最新更新