I'm currently sitting on Ubuntu and would like remote access to my application on OpenShift. I have done the following to create a ssh-rsa key (I've replaced the fingerprint with xx:xx...):
> mkdir ~/.ssh
> chmod 700 ~/.ssh
> ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/karl/.ssh/id_rsa): openshiftKey
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in openshiftKey.
Your public key has been saved in openshiftKey.pub.
The key fingerprint is:
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx karl@karllaptop
The key's randomart image is:
+--[ RSA 2048]----+
| |
... the rest of the image
This creates two files(notice they are not in ~/.ssh):
~/openshiftKey
~/openshiftKey.pub
I do not know where these files belong, the examples and tutorials say nothing of moving them.
I open the openshiftKey.pub and copy the code:
I paste it into Openshift:
Click save:
Go back to the application settings page and copy the ssh link:
And on my terminal try and connect:
I am sorry as I am new to ssh in this degree, what am I doing wrong?
Here is a problem:
You didn't accept the default, and gave your key a specific filename.
If you had accepted the default, then ssh would simply look in that default location anytime you make a remote connection to anywhere, and try to use that key.
In order to use a key other than the default key, you have to specify it explicitly when using ssh, for instance:
But you'll probably want to put the key into its default location, so that you can use the
rhc
command line tool to manage your gears. Trying to feed it ssh options is ... rather hairy.