2

I created a server on Linode using forge.laravel.

Everything seems to work fine but now I'm trying to access the server via SSH. Forge by default creates servers that do now allow SSH access via password and so I must add an SSH key to the server and there is an option on the control panel under the server manager tab to do so.

I followed an article from github to create the SSH keys and it works fine connecting to github.

help.github.com/articles/generating-ssh-keys

After placing my public key on forge I tried access the server via SSH using the following:

ssh MY_SERVER_PUBLIC_IP

 ssh forge@MY_SERVER_PUBLIC_IP -i /home/MYUSER/.ssh/id_rsa.pub

I got the following error:

Permission denied (publickey)

Any ideas on how to solve this problem????

7
  • You're using the wrong part of the key pair in your ssh command.
    – user35787
    Jul 12, 2014 at 7:04
  • How do I figure out the right part? I used the same key on github and it worked just fine.
    – Vinicius Santana
    Jul 12, 2014 at 7:07
  • read the docs for ssh in particular -i
    – user35787
    Jul 12, 2014 at 7:20
  • Any suggestions about where to find this docs? I've been reading articles about this matter for a few hours now and I haven't found anything helpful yet.
    – Vinicius Santana
    Jul 12, 2014 at 7:31
  • man ssh. Or google unix manpage ssh.
    – Jenny D
    Jul 12, 2014 at 8:03

1 Answer 1

1

When creating a key, there are two parts; the public and the private keys.

Go to forge and create a ssh key, you give it a name (any is fine) and then cut and paste the public key into the form field provided.

Then save the private key into you local .ssh folder using the same connection code reference the private key.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .