Deployiong rails app to digital ocean dokku ssh key not found

旧街凉风 提交于 2019-12-11 01:15:46

问题


I want to deploy rails app to digital ocean. I use this turorial: http://blog.flatironschool.com/using-digital-ocean-and-dokku-for-easier-rails-app-deploys/

When I do this:

First, you’ll need to copy your computer’s public SSH key. Go to your terminal and run this: $ cat /.ssh/idrsa.pub

I get the following output:

    jonstark@jonstark-pc:~$ cat /.ssh/idrsa.pub
cat: /.ssh/idrsa.pub: No such file or directory

What are my next actions? (I am really newbie to ubuntu). I understand that may be I should ask this question in another place. So if it so feel to tell me where.

Okay. I did something after googling. Here what I did:

jonstark@jonstark-pc:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/jonstark/.ssh/id_rsa): ocean
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in ocean.
Your public key has been saved in ocean.pub.
The key fingerprint is:
b6:8e:de:5f:37:2f:b6:96:d2:53:16:89:ef:a8:1c:5a jonstark@jonstark-pc
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|              . .|
|             . o |
|        S     . .|
|       . .     .o|
|        .  E..=+ |
|       +  +.ooB+ |
|     .o oo.o.+.+.|
+-----------------+

Then I found this generated ocean.pub file and copy paste the ssh key to digital ocean

But I gues I did everything wrong and I should not store the key in ocean.pub but in /.ssh/idrsapub instead.

Okay also I did this:

jonstark@jonstark-pc:~$  ssh-copy-id dokku@45.55.21.53
/usr/bin/ssh-copy-id: ERROR: No identities found

I am still confused

What do I do now?


回答1:


To get your public key in ubuntu you can try cat ~/.ssh/id_rsa.pub

If that doesn`t work you probably have to setup your ssh keys. A good tutorial step by step can be found here



来源:https://stackoverflow.com/questions/35460305/deployiong-rails-app-to-digital-ocean-dokku-ssh-key-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!